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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...