<?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 invoke a temporal lookup at a search-time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-invoke-a-temporal-lookup-at-a-search-time/m-p/150254#M42092</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I've got temporal lookup that is defined in transforms.conf as: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lookup_time]
filename = lookup_time.csv
max_matches = 1
time_field = start_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;csv file lookup_time.csv has a structure like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user_uid,type,start_time,start_month
13482832,WEB,1313096400,2011.08
13482832,MIX,1418331600,2014.12
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Invoking it at a search time like  &lt;CODE&gt;source=source1 | loookup lookup_time user_uid OUTPUT&lt;/CODE&gt; doesn't work correctly and I get both types for this user_uid at every moment of time. &lt;/P&gt;

&lt;P&gt;But it works when making this lookup automatically invoked with this source by putting a notion about it in props.conf,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::source1]
 LOOKUP-lookup_time = lookup_time user_uid OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and restarting config with &lt;CODE&gt;| extract reload=T&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But we don't need this lookup to run every time we address to source1, in order not to make search time longer as a lookup is heavy.&lt;/P&gt;

&lt;P&gt;So can I use temporal lookup at a search time? In lookups description there's no limitations about automatical or manual invoking of temporal lookup:&lt;BR /&gt;
Or am I doing mistake somewhere? &lt;BR /&gt;
Thanks in advance!&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/Usefieldlookupstoaddinformationtoyourevents"&gt;Edit existing lookup definitions or define a new file-based or external lookup&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Use the Settings &amp;gt; Lookups &amp;gt; Lookup definitions page to define the lookup table or edit existing lookup definitions. You can specify the type of lookup (file-based or external) and whether or not it is time-based. Once you've defined the lookup table, you can invoke the lookup in a search (using the lookup command) or you can configure the lookup to occur automatically.&lt;/P&gt;

&lt;HR /&gt;</description>
    <pubDate>Tue, 24 Feb 2015 15:48:39 GMT</pubDate>
    <dc:creator>iKate</dc:creator>
    <dc:date>2015-02-24T15:48:39Z</dc:date>
    <item>
      <title>How to invoke a temporal lookup at a search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-invoke-a-temporal-lookup-at-a-search-time/m-p/150254#M42092</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I've got temporal lookup that is defined in transforms.conf as: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[lookup_time]
filename = lookup_time.csv
max_matches = 1
time_field = start_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;csv file lookup_time.csv has a structure like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user_uid,type,start_time,start_month
13482832,WEB,1313096400,2011.08
13482832,MIX,1418331600,2014.12
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Invoking it at a search time like  &lt;CODE&gt;source=source1 | loookup lookup_time user_uid OUTPUT&lt;/CODE&gt; doesn't work correctly and I get both types for this user_uid at every moment of time. &lt;/P&gt;

&lt;P&gt;But it works when making this lookup automatically invoked with this source by putting a notion about it in props.conf,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::source1]
 LOOKUP-lookup_time = lookup_time user_uid OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and restarting config with &lt;CODE&gt;| extract reload=T&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But we don't need this lookup to run every time we address to source1, in order not to make search time longer as a lookup is heavy.&lt;/P&gt;

&lt;P&gt;So can I use temporal lookup at a search time? In lookups description there's no limitations about automatical or manual invoking of temporal lookup:&lt;BR /&gt;
Or am I doing mistake somewhere? &lt;BR /&gt;
Thanks in advance!&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/Usefieldlookupstoaddinformationtoyourevents"&gt;Edit existing lookup definitions or define a new file-based or external lookup&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Use the Settings &amp;gt; Lookups &amp;gt; Lookup definitions page to define the lookup table or edit existing lookup definitions. You can specify the type of lookup (file-based or external) and whether or not it is time-based. Once you've defined the lookup table, you can invoke the lookup in a search (using the lookup command) or you can configure the lookup to occur automatically.&lt;/P&gt;

&lt;HR /&gt;</description>
      <pubDate>Tue, 24 Feb 2015 15:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-invoke-a-temporal-lookup-at-a-search-time/m-p/150254#M42092</guid>
      <dc:creator>iKate</dc:creator>
      <dc:date>2015-02-24T15:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke a temporal lookup at a search-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-invoke-a-temporal-lookup-at-a-search-time/m-p/150255#M42093</link>
      <description>&lt;P&gt;It should work in both cases.&lt;/P&gt;

&lt;P&gt;Can you try adding&lt;/P&gt;

&lt;P&gt;time_format = %s&lt;/P&gt;

&lt;P&gt;Otherwise check your permissions on the lookup and set to global to see if it helps.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-invoke-a-temporal-lookup-at-a-search-time/m-p/150255#M42093</guid>
      <dc:creator>peterchenadded</dc:creator>
      <dc:date>2017-11-02T08:38:58Z</dc:date>
    </item>
  </channel>
</rss>

