<?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 use timebased lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292899#M164952</link>
    <description>&lt;P&gt;There is no  difference in the syntax for the lookup command. However the data returned by lookup command will also take the time in consideration. Try with the time range as per value of SwipeTime&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 06:00:44 GMT</pubDate>
    <dc:creator>hardikJsheth</dc:creator>
    <dc:date>2017-11-22T06:00:44Z</dc:date>
    <item>
      <title>How to use timebased lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292898#M164951</link>
      <description>&lt;P&gt;I defined a lookup table as timebased config in transforms.conf as below &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[swipeR.csv]
batch_index_query = 0
case_sensitive_match = 0
filename = swipeR.csv
max_offset_secs = 600
time_field = SwipeTime
time_format = %d/%m/%y %H:%M
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however when I try to run following queue&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="csv" 
|lookup swipeR.csv SwipeTime AS LogonAt OUTPUT Action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it shows me error message&lt;/P&gt;

&lt;P&gt;Error in 'lookup' command: You cannot use timefield as a lookup field.&lt;BR /&gt;
any suggestion on what is may go wrong?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sam&lt;/P&gt;

&lt;P&gt;I think it may because I use the time as a lookup field &lt;BR /&gt;
I change my queue to &lt;BR /&gt;
    index=main sourcetype="csv" &lt;BR /&gt;
    | lookup swipe FullUserName OUTPUT Action&lt;BR /&gt;
it doesnt return any result, eventhough I am sure there is time match my queue. What is the syntax to use time based lookup? is that different as normal lookup?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 04:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292898#M164951</guid>
      <dc:creator>samlinsongguo</dc:creator>
      <dc:date>2017-11-22T04:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timebased lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292899#M164952</link>
      <description>&lt;P&gt;There is no  difference in the syntax for the lookup command. However the data returned by lookup command will also take the time in consideration. Try with the time range as per value of SwipeTime&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 06:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292899#M164952</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2017-11-22T06:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timebased lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292900#M164953</link>
      <description>&lt;P&gt;Found the problem. my lookup table define the time format as &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;%d/%m/%y %H:%M&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;but when I open the .csv file from excel it auto changed the time format to&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;%d/%m/%Y %H:%M&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;so the lookup table doesn't work. once I edit it in the notepad and change from 2017 to 17 and recreate the lookup table everything work as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 23:47:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timebased-lookup-table/m-p/292900#M164953</guid>
      <dc:creator>samlinsongguo</dc:creator>
      <dc:date>2017-11-23T23:47:59Z</dc:date>
    </item>
  </channel>
</rss>

