All Apps and Add-ons

how to convert dbquery search to dbxquery search

hartfoml
Motivator

I have several hundred dbquery searches that I need to make work with the new DB Connect Version and convert to dbxquery. The select statements seam to work ok with the new connecter but the output is very different.

With the old connector I get an output field of NAME
With the new connector I get an output field of (002) ORGANIZATION.NAME.VARCHAR

is there a way to limit the output on the new connector to only the column name and not show the column number (002) and the table ORGANIZATION and the data type VARCHAR in the output field

The old syntax form of | dbquery "connectorname" "select"
to the new syntax of | dbxquery connection="connectorname" query="select"

I think I can deal with this OK with a search and replace.
The output field name changes will mean a whole other set of complexity to the conversion.

1 Solution

somesoni2
Revered Legend

You need to include following parameter with your dbxquery command.

shortnames

Syntax: shortnames=<bool>
Description: By default, the returned fields will be in the form <TABLE>.<COLUMN>.<DATATYPE>. Setting the shortnames argument to true will return fields called <COLUMN>.
Default: shortnames=false

View solution in original post

somesoni2
Revered Legend

You need to include following parameter with your dbxquery command.

shortnames

Syntax: shortnames=<bool>
Description: By default, the returned fields will be in the form <TABLE>.<COLUMN>.<DATATYPE>. Setting the shortnames argument to true will return fields called <COLUMN>.
Default: shortnames=false

hartfoml
Motivator

you are a lifesaver. Don't know how i missed this in the documentation. Thanks so much.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...