<?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 Import data without duplicates in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Import-data-without-duplicates/m-p/406121#M3553</link>
    <description>&lt;P&gt;I have a missing set of data. I've been given a new set of data to fill the gaps but there are some duplicates in the raw file to what is already in splunk and I need a way to import the non duplicate data.&lt;/P&gt;

&lt;P&gt;So far I've managed to import the new data into a separate index and used a query to remove the items that are already in the main index then tired the collect command to put the values into another index (I've used a dummy one to start with so I don't mess up my main index). However when the data is copied it messes up some of the date formats (turns them to epoch)  and doesn't pick up the _time field correctly.&lt;/P&gt;

&lt;P&gt;Current code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    (index=main sourcetype="sourcetype1") OR (index=sourceindex" ) 
    | eventstats count by deviceCustomDate1 fileName 
    | search count=1
    | collect index=sourceindex sourcetype=sourcetype1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if I look at the results for one of the record in both indexs I get this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  _time               deviceCustomDate1           index
  2019-05-16 23:47:21   2019/05/16 22:47:21 UTC     sourceindex
  2019-05-17 00:03:29   1558046841000                 destinationindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something? Is Collect the right tool to use?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2019 10:17:37 GMT</pubDate>
    <dc:creator>alucarddjin</dc:creator>
    <dc:date>2019-07-25T10:17:37Z</dc:date>
    <item>
      <title>Import data without duplicates</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Import-data-without-duplicates/m-p/406121#M3553</link>
      <description>&lt;P&gt;I have a missing set of data. I've been given a new set of data to fill the gaps but there are some duplicates in the raw file to what is already in splunk and I need a way to import the non duplicate data.&lt;/P&gt;

&lt;P&gt;So far I've managed to import the new data into a separate index and used a query to remove the items that are already in the main index then tired the collect command to put the values into another index (I've used a dummy one to start with so I don't mess up my main index). However when the data is copied it messes up some of the date formats (turns them to epoch)  and doesn't pick up the _time field correctly.&lt;/P&gt;

&lt;P&gt;Current code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    (index=main sourcetype="sourcetype1") OR (index=sourceindex" ) 
    | eventstats count by deviceCustomDate1 fileName 
    | search count=1
    | collect index=sourceindex sourcetype=sourcetype1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if I look at the results for one of the record in both indexs I get this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  _time               deviceCustomDate1           index
  2019-05-16 23:47:21   2019/05/16 22:47:21 UTC     sourceindex
  2019-05-17 00:03:29   1558046841000                 destinationindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something? Is Collect the right tool to use?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 10:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Import-data-without-duplicates/m-p/406121#M3553</guid>
      <dc:creator>alucarddjin</dc:creator>
      <dc:date>2019-07-25T10:17:37Z</dc:date>
    </item>
  </channel>
</rss>

