Splunk Search

DB Connect 1: Is it possible to get a new field using dbquery that does not exist in an index?

sfatnass
Contributor

Hi

I want to know if it's possible to get a new field from dbquery that does not exist in an index:

index=A 
[|inputlookup file.csv | table field_ip]
| join type=outer fieldA [dbquery ..."select......" |fields + fieldA |rename fieldA as fieldB]
|table fieldB

i tried this, but was not successful. fieldB doesn't exist in index=A, but i need it. How can i do it?

thx

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

The right way to do this is a dblookup.

0 Karma

sfatnass
Contributor

but the dblookup can return just the first matching line in my database

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...