<?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 display lookup table records in search table? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548664#M37811</link>
    <description>&lt;P&gt;I'm working through an automatic lookup definition now, but I'm stuck. I want the field in my lookup table (the cookie) to be used as a text match in a search; the automatic lookup assumes that I have a specific event field that I want to align my lookup field with (which I don't).&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 18:41:14 GMT</pubDate>
    <dc:creator>beetlegeuse</dc:creator>
    <dc:date>2021-04-20T18:41:14Z</dc:date>
    <item>
      <title>How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548605#M37801</link>
      <description>&lt;P&gt;I'm sure I'm missing something that's pretty obvious, and I'm hopeful that someone can show me the light. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm running a search that references a lookup table for the search criteria as follows:&lt;/P&gt;&lt;P&gt;index=foo sourcetype=bar&amp;nbsp; [ | inputlookup "cookies.csv" | rename cookie as query | fields query ] | table _time, query, field1, field2&lt;/P&gt;&lt;P&gt;The "cookies.csv" lookup file looks like this:&lt;/P&gt;&lt;P&gt;cookie&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;-- header name&lt;/P&gt;&lt;P&gt;cookie1&lt;/P&gt;&lt;P&gt;cookie2&lt;/P&gt;&lt;P&gt;cookie3&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;As noted in the SPL, I'm running a text based search using the entries from the lookup file (searching on all cookies present). Once the search is complete, I produce a table with rows reflecting the index time, the matching cookie from the lookup file, and two additional fields for each event returned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My use of the special sub-search field "query" comes from this Splunk community post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Subsearch-fields-quot-query-quot-quot-search-quot-How-do-I-know/m-p/62422" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Subsearch-fields-quot-query-quot-quot-search-quot-How-...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The SPL executes correctly and returns a table with everything I'm expecting EXCEPT the cookie from the lookup file that was matched in the search; that field ("query", since I renamed it) returns as blank in the table.&lt;/P&gt;&lt;P&gt;What do I need to change to see the cookies from the lookup file in the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;If I replace...&lt;/P&gt;&lt;P&gt;[ | inputlookup "cookies.csv" | rename cookie as query | fields query ]&lt;/P&gt;&lt;P&gt;...with...&lt;/P&gt;&lt;P&gt;[ | inputlookup "cookies.csv" | fields cookie | rename cookie as search | format ]&lt;/P&gt;&lt;P&gt;...I have the same issue. My table shows _time, field1 and field2 for all matching events, but not the cookie entry from the lookup that was used for the match.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 13:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548605#M37801</guid>
      <dc:creator>beetlegeuse</dc:creator>
      <dc:date>2021-04-21T13:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548635#M37805</link>
      <description>&lt;P&gt;Does the foo index have a field called "query" in it?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 16:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548635#M37805</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-20T16:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548645#M37806</link>
      <description>&lt;P&gt;try this ,&lt;BR /&gt;&lt;SPAN&gt;index=foo sourcetype=bar&amp;nbsp; [ | inputlookup "cookies.csv" ]&amp;nbsp;| rename cookie as query&amp;nbsp; | table _time, query, field1, field2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548645#M37806</guid>
      <dc:creator>TheFlash</dc:creator>
      <dc:date>2021-04-20T17:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548647#M37807</link>
      <description>&lt;P&gt;No. Using this query...&lt;/P&gt;&lt;P&gt;index=foo | stats values(*) AS * | transpose | table column | rename column AS Fieldnames&lt;/P&gt;&lt;P&gt;...the field "query" does not show up.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548647#M37807</guid>
      <dc:creator>beetlegeuse</dc:creator>
      <dc:date>2021-04-20T17:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548650#M37808</link>
      <description>&lt;P&gt;Unfortunately, that search does not work. It results in zero events found.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548650#M37808</guid>
      <dc:creator>beetlegeuse</dc:creator>
      <dc:date>2021-04-20T17:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548651#M37809</link>
      <description>&lt;P&gt;I tried something like&amp;nbsp; this with my lookup it is working, can you please check whether&amp;nbsp; your time-range picker is right ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;or you can try one more thing , add your lookup to automatic lookup and remove [ inputlookup cookies.csv] from your search query&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548651#M37809</guid>
      <dc:creator>TheFlash</dc:creator>
      <dc:date>2021-04-20T17:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548664#M37811</link>
      <description>&lt;P&gt;I'm working through an automatic lookup definition now, but I'm stuck. I want the field in my lookup table (the cookie) to be used as a text match in a search; the automatic lookup assumes that I have a specific event field that I want to align my lookup field with (which I don't).&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 18:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548664#M37811</guid>
      <dc:creator>beetlegeuse</dc:creator>
      <dc:date>2021-04-20T18:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548715#M37820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/167489"&gt;@beetlegeuse&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You answered no to&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;'s question. You do not have a field named &lt;STRONG&gt;query&lt;/STRONG&gt; in your index. That is why it is normal that the query field is blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there is a misunderstanding on subsearch. You have a cookie field in your lookup. What is the field name in your index that you want to search/match with the cookie field in your lookup? It seems it is not "query". If you replace "query" with the field in your index everything will be fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 04:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548715#M37820</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-04-21T04:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to display lookup table records in search table?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548783#M37824</link>
      <description>&lt;P&gt;My intent is to use the contents of the lookup file as part of a general text based search against all events that fall in line with the index and sourcetype I've defined. For example: If the string "cookie1" appears anywhere in an event (regardless of field), I want that event reflected in my table. The table should reflect all events that contain "cookie1", "cookie2", etc.&lt;/P&gt;&lt;P&gt;My use of the special sub-search field "query" comes from this Splunk community post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Subsearch-fields-quot-query-quot-quot-search-quot-How-do-I-know/m-p/62422" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Subsearch-fields-quot-query-quot-quot-search-quot-How-do-I-know/m-p/62422&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm able to use "query" to successfully perform the search I've detailed above (my table shows _time, field1 and field2 for all matching events as expected), but I'm unable to show the lookup entry that matched the event in my table as a result.&amp;nbsp; So, I suppose the question is: How can I perform the text based search I need and still be able to reference the lookup entries in my table?&amp;nbsp; The use of "query" seems to be restricting my ability to do that.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 13:18:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-lookup-table-records-in-search-table/m-p/548783#M37824</guid>
      <dc:creator>beetlegeuse</dc:creator>
      <dc:date>2021-04-21T13:18:17Z</dc:date>
    </item>
  </channel>
</rss>

