<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to perform a bulk/batch delete of KV Store records via REST API? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267354#M51195</link>
    <description>&lt;P&gt;I don't think this will work for us&lt;/P&gt;

&lt;P&gt;We cannot simply use a "where" statement, because we have to assume that the independent input process was adding new data matching the initial query.&lt;BR /&gt;
Also not all the fetched objects might be processed for various reasons.&lt;/P&gt;

&lt;P&gt;Therefore we need to do a bulk delete like "delete the following list of objects ..."&lt;/P&gt;

&lt;P&gt;Greetings&lt;BR /&gt;
Mathias&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2016 08:56:45 GMT</pubDate>
    <dc:creator>mathiask</dc:creator>
    <dc:date>2016-12-12T08:56:45Z</dc:date>
    <item>
      <title>How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267349#M51190</link>
      <description>&lt;P&gt;We are trying to find a way to leverage the REST API to perform a bulk delete of KV Store records. Currently, the REST API only supports single record deletion or whole KVStore deletion. &lt;/P&gt;

&lt;P&gt;I'm wondering if Splunk will eventually support bulk record deletion of KVStore records via REST.&lt;BR /&gt;
Any Splunkers' insight into this will be super helpful. &lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 18:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267349#M51190</guid>
      <dc:creator>djfangBAH</dc:creator>
      <dc:date>2016-10-20T18:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267350#M51191</link>
      <description>&lt;P&gt;Would creating a script to first list all the keys that you want delete and loop through it to delete one by one approach acceptable for you?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 20:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267350#M51191</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-20T20:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267351#M51192</link>
      <description>&lt;P&gt;Hi somesoni2,&lt;/P&gt;

&lt;P&gt;Thanks for your reply. It appears that looping through let's say few hundred or a few thousand will be very slow as experienced by someone else in the community: &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/431947/how-can-i-delete-kvstore-keys-at-high-speed.html"&gt;https://answers.splunk.com/answers/431947/how-can-i-delete-kvstore-keys-at-high-speed.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 20:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267351#M51192</guid>
      <dc:creator>djfangBAH</dc:creator>
      <dc:date>2016-10-20T20:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267352#M51193</link>
      <description>&lt;P&gt;We also encounter this problem&lt;/P&gt;

&lt;P&gt;We are using the KV store as backend/DB for an other application.&lt;BR /&gt;
We create entries in the order of 50k - 200k.&lt;BR /&gt;
Later we read, process and want to delete them.&lt;BR /&gt;
But deleting 70k entries takes "forever" ...&lt;/P&gt;

&lt;P&gt;Get the collection, clean the entries that have to be deleted, then delete the collection and store the cleaned collection is NOT an option.&lt;BR /&gt;
The import process is independent and could write new entries at the same time.&lt;/P&gt;

&lt;P&gt;We would really welcome either a batch delete or any other performance improvement&lt;BR /&gt;
Otherwise we have to choose an other backend, which greatly reduces the benefits of using Splunk for this use case.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 09:47:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267352#M51193</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2016-11-25T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267353#M51194</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
I use CURL to interact with REST endpoint to do bulk deletions&lt;/P&gt;

&lt;P&gt;You can test by putting the data in the Link : &lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZG"&gt;http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZG&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For example if I need to delete id greater than 24: {"id": {"$gt": 24}} &lt;BR /&gt;
(Assuming your app to be "&lt;EM&gt;kvstoretest&lt;/EM&gt;" and kvstore to be "&lt;EM&gt;kvstorecoll&lt;/EM&gt;"&lt;BR /&gt;
- Use the site &lt;A href="http://meyerweb.com/eric/tools/dencoder/"&gt;http://meyerweb.com/eric/tools/dencoder/&lt;/A&gt;  to encode the value . Then run below curl command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme -X DELETE \
      &lt;A href="https://localhost:8089/servicesNS/nobody/kvstoretest/storage/collections/data/kvstorecoll?query=%7B%22id%22%3A%7B%22%24gt%22%3A24%7D%7D" target="test_blank"&gt;https://localhost:8089/servicesNS/nobody/kvstoretest/storage/collections/data/kvstorecoll?query=%7B%22id%22%3A%7B%22%24gt%22%3A24%7D%7D&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since it is REST endpoint, I hope it will work smoothly with clustered SH's too&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2016 19:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267353#M51194</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2016-12-11T19:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267354#M51195</link>
      <description>&lt;P&gt;I don't think this will work for us&lt;/P&gt;

&lt;P&gt;We cannot simply use a "where" statement, because we have to assume that the independent input process was adding new data matching the initial query.&lt;BR /&gt;
Also not all the fetched objects might be processed for various reasons.&lt;/P&gt;

&lt;P&gt;Therefore we need to do a bulk delete like "delete the following list of objects ..."&lt;/P&gt;

&lt;P&gt;Greetings&lt;BR /&gt;
Mathias&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 08:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267354#M51195</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2016-12-12T08:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a bulk/batch delete of KV Store records via REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267355#M51196</link>
      <description>&lt;P&gt;Suppose I have a list to delete, I use  a batch save to modify all the members of this list to have a field set to a non-valid value. For example, if 0 is invalid for the field 'id', set it to all the members of the list and do one batch save to the kv store. &lt;/P&gt;

&lt;P&gt;Then, another call to make a batch delete through the query {'id' :  0}, e.g.&lt;/P&gt;

&lt;P&gt;collection.data.delete(query=json.dumps({'id' :  0})&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 06:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-perform-a-bulk-batch-delete-of-KV-Store-records-via-REST/m-p/267355#M51196</guid>
      <dc:creator>wlusplunk</dc:creator>
      <dc:date>2017-01-06T06:11:42Z</dc:date>
    </item>
  </channel>
</rss>

