<?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: 'Empty' a csv on a daily basis in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508081#M141999</link>
    <description>&lt;P&gt;Have you tried using the paramter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;create_empty=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in your outputlookup command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Skalli&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 13:19:31 GMT</pubDate>
    <dc:creator>skalliger</dc:creator>
    <dc:date>2020-07-08T13:19:31Z</dc:date>
    <item>
      <title>'Empty' a csv on a daily basis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508046#M141995</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a dashboard where users can add comments to a .csv lookup file.&amp;nbsp; The comments are only related to the day that they are added.&amp;nbsp; I would like to be able to clear down the .csv on a daily basis (around midnight).&amp;nbsp; Is there a way that I can do this using Splunk to keep all the code in one place?&lt;/P&gt;&lt;P&gt;I plan to use the 'collect' command to send the contents to an index prior to removing all the entries in whatever way is possible.&lt;/P&gt;&lt;P&gt;I have tried using outputlookup but only succeeded in writing blank lines to the .csv, not overwriting or removing the contents.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 11:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508046#M141995</guid>
      <dc:creator>timrich66</dc:creator>
      <dc:date>2020-07-08T11:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: 'Empty' a csv on a daily basis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508081#M141999</link>
      <description>&lt;P&gt;Have you tried using the paramter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;create_empty=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in your outputlookup command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Skalli&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508081#M141999</guid>
      <dc:creator>skalliger</dc:creator>
      <dc:date>2020-07-08T13:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: 'Empty' a csv on a daily basis</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508088#M142001</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/203859"&gt;@skalliger&lt;/a&gt;&amp;nbsp;, thanks for the reply.&amp;nbsp; Yes, I tried this but only managed to create empty lines in the csv.&lt;/P&gt;&lt;P&gt;I have written this search which only returns the entries for 'today'.&amp;nbsp; A work around for now.&lt;/P&gt;&lt;P&gt;| inputlookup comment.csv&lt;BR /&gt;| eval Comment=if(isnull(Comment),New_Note,Comment)&lt;BR /&gt;| eval Date=if(isnull(Date),Date_new,Date)&lt;BR /&gt;| eval tdate=strftime(now(),"%d/%m/%Y")&lt;BR /&gt;| rex field=Date "(?&amp;lt;cdate&amp;gt;\d\d\/\d\d\/\d\d\d\d) "&lt;BR /&gt;| table Date, Comment, tdate, cdate&lt;BR /&gt;| where tdate=cdate&lt;BR /&gt;| table Date, Comment&lt;BR /&gt;| sort -Date&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Empty-a-csv-on-a-daily-basis/m-p/508088#M142001</guid>
      <dc:creator>timrich66</dc:creator>
      <dc:date>2020-07-08T13:33:03Z</dc:date>
    </item>
  </channel>
</rss>

