<?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 How to prevent data duplication on a csv file ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-data-duplication-on-a-csv-file/m-p/562232#M100137</link>
    <description>&lt;P&gt;I have a scheduled search that outputs the results every 5 minutes using the outputcsv command to local disk. The file is stored with name abc_dns.csv&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc |fields _time _raw |fields - _indextime _sourcetype _subsecond |outputcsv abc_dns&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I am forwarding that file to an external Indexer&lt;/P&gt;&lt;P&gt;inputs.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor:///opt/splunk/var/run/splunk/csv/abc_dns.csv]
index = abc_dns_logs
sourcetype = abc_dns
#crcSalt = &amp;lt;SOURCE&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[abc_dns]
INDEXED_EXTRACTIONS = csv
HEADER_FIELD_LINE_NUMBER = 1
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = structured
TRANSFORMS-t1 = eliminate_header&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[eliminate_header]
REGEX = ^"_time","_raw"$
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I validate the results, I am seeing data is getting duplicated on the external Indexer.&lt;/P&gt;&lt;P&gt;I attempted to add crcSalt = &amp;lt;SOURCE&amp;gt; to check if it makes any difference, which seemed that it did initially, however, afterwhile, I saw data was getting duplicated again. In reality, there is indeed duplicate data in original logs itself, but overall I am actually seeing data from the monitored file is also getting duplicated.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help with this ?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 11:00:38 GMT</pubDate>
    <dc:creator>dm1</dc:creator>
    <dc:date>2021-08-05T11:00:38Z</dc:date>
    <item>
      <title>How to prevent data duplication on a csv file ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-data-duplication-on-a-csv-file/m-p/562232#M100137</link>
      <description>&lt;P&gt;I have a scheduled search that outputs the results every 5 minutes using the outputcsv command to local disk. The file is stored with name abc_dns.csv&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc |fields _time _raw |fields - _indextime _sourcetype _subsecond |outputcsv abc_dns&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I am forwarding that file to an external Indexer&lt;/P&gt;&lt;P&gt;inputs.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor:///opt/splunk/var/run/splunk/csv/abc_dns.csv]
index = abc_dns_logs
sourcetype = abc_dns
#crcSalt = &amp;lt;SOURCE&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[abc_dns]
INDEXED_EXTRACTIONS = csv
HEADER_FIELD_LINE_NUMBER = 1
KV_MODE = none
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = structured
TRANSFORMS-t1 = eliminate_header&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[eliminate_header]
REGEX = ^"_time","_raw"$
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I validate the results, I am seeing data is getting duplicated on the external Indexer.&lt;/P&gt;&lt;P&gt;I attempted to add crcSalt = &amp;lt;SOURCE&amp;gt; to check if it makes any difference, which seemed that it did initially, however, afterwhile, I saw data was getting duplicated again. In reality, there is indeed duplicate data in original logs itself, but overall I am actually seeing data from the monitored file is also getting duplicated.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help with this ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 11:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-data-duplication-on-a-csv-file/m-p/562232#M100137</guid>
      <dc:creator>dm1</dc:creator>
      <dc:date>2021-08-05T11:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent data duplication on a csv file ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-data-duplication-on-a-csv-file/m-p/562448#M100181</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233960"&gt;@dm1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the csv file generated from the search has duplicate rows, indexer will index them as is. You need to remove duplicates in your search.&lt;/P&gt;&lt;P&gt;Please try this out.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc |fields _time _raw |fields - _indextime _sourcetype _subsecond | dedup field_names* |outputcsv abc_dns&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 17:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-prevent-data-duplication-on-a-csv-file/m-p/562448#M100181</guid>
      <dc:creator>anilchaithu</dc:creator>
      <dc:date>2021-08-06T17:14:55Z</dc:date>
    </item>
  </channel>
</rss>

