Dashboards & Visualizations

Time Picker in dbxquery BETWEEN SQL clause

andy_hollywood
Loves-to-Learn Lots

 

HI Guys - relative newbie, so apologise if this has been answered, I did look around, but couldn't find anything. 

I have built a dashboard, it has a time input that generated values like:  earliest = -15m to latest = now, how can I turn these into SQL compatible data types so that when I execute:

 

 

 

| dbxquery query="SELECT * FROM tableName WHERE created BETWEEN $LATEST$ AND $EARLIEST$" connection="dbConnectionName"

 

Where in the illustration above my time picker is: $tok.timeWindow.earliest$ to $tok.timeWindow.latest$

 

 So that the earliest and latest values can sit within a between clause.

 

Thanks.

Labels (2)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...