Getting Data In

Splunk DB Connect: Can the checkpoint value be used in query?

cherryng
New Member

I am adjusting the SQL statement for data input. There is a guideline to use rising input mode.

SELECT * FROM your_table
WHERE dtime > ?
ORDER BY dtime ASC

How to use the checkpoint value (?) also as upper limit? Say
... WHERE dtime > ? AND dtime < ? + INTERVAL '1 day'

Labels (1)
0 Karma

jscraig2006
Communicator

I've ran across this several times when our databases that do not have a rising column or incrementing ID (Primary Key). Our solution was to change these to batch and query records between datetime and set the DB connect to query to the record time.. example if i grab the last 15 mins of records then I would set the DB connect to query every 15 mins.
The rising column has to be numeric. There maybe some better answers out there. This has always worked for us.

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...