Splunk Search

How do I delete previously loaded data before new data is indexed in Splunk?

shivendra_infy
Path Finder

Hi

I am using SQL Source as my Data Source. I have written a Select query which loads data in the Database every 5 minutes. Now, what I need is before the Select query loads data in Splunk, I need to delete the previously loaded data.

0 Karma

puneethgowda
Communicator

I have the same question data is appending but old data and new data will be same some time so i am seeing less than 1,000 rows in MS sql live db and 10,000 rows in splunk which means 1000*10=10,000 but there should be 1,000 rows only as it is in ms sql i mean mirroring !:)

0 Karma

ddrillic
Ultra Champion

You can always run <base query> | delete which would delete the returned data.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Have you considered a live db lookup instead of deleting and reindexing the data every few minutes?
If you can't do a live lookup, consider writing the data into the key value store instead of indexing it. There you can delete, update, etc.

For actually indexed data, delete and update aren't valid operations.

Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...