<?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 Add a Date field to a ref table that doesn't have a date field that gets updated once a month so that it will can be used as a subquery in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111477#M29213</link>
    <description>&lt;P&gt;Howdy from Dallas Texas,&lt;BR /&gt;
I have an employee info table that gets indexed in splunk once a month and has no date field.&lt;BR /&gt;
This table is used extensively as Subsearch to define specific subsets of employees.&lt;BR /&gt;
However my problem is that since the table only has a timestamp of when it is loaded each month I have to use custom date for the subsearch from the date range (i.e., earliest=-45d) to include the employee file in my main search.&lt;BR /&gt;&lt;BR /&gt;
I have already tried to do a field extraction of the time to add to my index but it did not seem to work.&lt;BR /&gt;
I'm sure that there is an easy solution but I'm not very experienced with Splunk so Your suggestions/recommendations would be greatly appreciated.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 04 Sep 2014 14:36:44 GMT</pubDate>
    <dc:creator>pparkerntx99</dc:creator>
    <dc:date>2014-09-04T14:36:44Z</dc:date>
    <item>
      <title>Add a Date field to a ref table that doesn't have a date field that gets updated once a month so that it will can be used as a subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111477#M29213</link>
      <description>&lt;P&gt;Howdy from Dallas Texas,&lt;BR /&gt;
I have an employee info table that gets indexed in splunk once a month and has no date field.&lt;BR /&gt;
This table is used extensively as Subsearch to define specific subsets of employees.&lt;BR /&gt;
However my problem is that since the table only has a timestamp of when it is loaded each month I have to use custom date for the subsearch from the date range (i.e., earliest=-45d) to include the employee file in my main search.&lt;BR /&gt;&lt;BR /&gt;
I have already tried to do a field extraction of the time to add to my index but it did not seem to work.&lt;BR /&gt;
I'm sure that there is an easy solution but I'm not very experienced with Splunk so Your suggestions/recommendations would be greatly appreciated.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 14:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111477#M29213</guid>
      <dc:creator>pparkerntx99</dc:creator>
      <dc:date>2014-09-04T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Date field to a ref table that doesn't have a date field that gets updated once a month so that it will can be used as a subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111478#M29214</link>
      <description>&lt;P&gt;So, Splunk is timebased... I do have similar situations here but I don't see as a problem to use "earliest=-45d" in the subsearch. I normally include a bigger period, lets say that covers 2 or 3 imports, and use a "dedup" to make user I get the last record.&lt;/P&gt;

&lt;P&gt;The other alternative is to export the employee data as a lookup table. You could use it in a lookup format or using "inputlookup" command. In both cases, there is no "date"... like that:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=main &amp;lt;your search&amp;gt; [ inputlookup employees.csv name="John" | return id=employee_id ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 00:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111478#M29214</guid>
      <dc:creator>musskopf</dc:creator>
      <dc:date>2014-09-05T00:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Date field to a ref table that doesn't have a date field that gets updated once a month so that it will can be used as a subquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111479#M29215</link>
      <description>&lt;P&gt;Splunk is really designed to index "events." Events are a record of something interesting that happened at a particular time. For the employee info data, I recommend that you use a lookup. Lookups are fast, and you don't need a sub-search, which will make your searches less complicated. You also don't need to mess with date ranges if you use lookups.&lt;/P&gt;

&lt;P&gt;You will need to upload your employee info data to Splunk as a CSV file. You can update the file at will. (It's just a CSV in a particular directory on the Splunk server.)&lt;/P&gt;

&lt;P&gt;Here is the best place to learn more, it is a tutorial on lookups: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchTutorial/Usefieldlookups"&gt;Use Field Lookups&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Sep 2014 23:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-Date-field-to-a-ref-table-that-doesn-t-have-a-date-field/m-p/111479#M29215</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-06T23:53:10Z</dc:date>
    </item>
  </channel>
</rss>

