I have a significant number of dashboards that use dbxquery to pull data from a significant number of servers running many nosql databases (>20) with standardized collection names(>20). I have database connections defined for each server/database combination: I'm currently using a simple dbxquery in search to pull data from these collections:
|dbxquery connection=$server_name$_database_name query ="SELECT * FROM collection_name"
|(numerous transformations)
This works fine. Unfortunately, there's a lot of field transformations, json processing, etc. that needs to happen after the query, and its always the standard 8-10 lines. I'd like to standardize these queries and imbed them in a macro. I'd like to bundle all of this in a macro like this:
`collection_name(server_name)`
The problem is that |dbxquery doesn't appear to like being the first command in a macro.
Error in 'dbxquery' command: This command must be the first command of a search.
The search job has failed due to an error. You may be able view the job in the Job Inspector.
Any ideas how to implement this macro in a clean way?
... View more