<?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: Create fields from the lookup content in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566102#M197267</link>
    <description>&lt;P&gt;Are you looking to have both values available at the same time? If so, you might consider changing your lookup to&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;testvalue1&lt;/TD&gt;&lt;TD width="50%"&gt;testvalue2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;value1&lt;/TD&gt;&lt;TD width="50%"&gt;value2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;then use inputlookup to add them to your search&lt;/P&gt;</description>
    <pubDate>Tue, 07 Sep 2021 09:36:27 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-09-07T09:36:27Z</dc:date>
    <item>
      <title>Create fields from the lookup content</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566082#M197255</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In order to parametrize the search, I created a lookup with a couple of numerical values that I would like to easily change when necessary.&lt;/P&gt;&lt;P&gt;the format of the csv file (test.csv) is the following (this format could be changed based on the answers to this post)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Threshold          Value

name1                 value1

name2                 value2&lt;/LI-CODE&gt;&lt;P&gt;the only way to do what I want is the following query&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval tempField="name1"
| lookup test.csv Threshold as tempField OUTPUT Value as test1value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any better or more efficient way of doing this?&lt;/P&gt;&lt;P&gt;I was imagining something like the line below but it didnt manage to make it work.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup test.csv Threshold  as "name1" OUTPUT Value as test1value&lt;/LI-CODE&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 07:56:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566082#M197255</guid>
      <dc:creator>corti77</dc:creator>
      <dc:date>2021-09-07T07:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create fields from the lookup content</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566102#M197267</link>
      <description>&lt;P&gt;Are you looking to have both values available at the same time? If so, you might consider changing your lookup to&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;testvalue1&lt;/TD&gt;&lt;TD width="50%"&gt;testvalue2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;value1&lt;/TD&gt;&lt;TD width="50%"&gt;value2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;then use inputlookup to add them to your search&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 09:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566102#M197267</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-07T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create fields from the lookup content</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566134#M197286</link>
      <description>&lt;P&gt;I created the CSV the way you proposed as I need to have both fields at the same time and I tried the following&lt;/P&gt;&lt;P&gt;index=_internal&lt;BR /&gt;| head 5&lt;BR /&gt;| inputlookup append=t test.csv&lt;/P&gt;&lt;P&gt;but it only creates new columns in a new event&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corti77_0-1631019603698.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15887i12122857A1B6C1F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corti77_0-1631019603698.png" alt="corti77_0-1631019603698.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 13:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566134#M197286</guid>
      <dc:creator>corti77</dc:creator>
      <dc:date>2021-09-07T13:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create fields from the lookup content</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566141#M197291</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal
| head 5
| inputlookup append=t test.csv
| eventstats values(CriticalDefault) as CriticalDefault values(WarningDefault) as WarningDefault
| where isnotnull(_raw)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Sep 2021 13:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-fields-from-the-lookup-content/m-p/566141#M197291</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-07T13:43:33Z</dc:date>
    </item>
  </channel>
</rss>

