<?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: Splunk search using CSV file data as input in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224795#M98931</link>
    <description>&lt;P&gt;In you first search example, the field name appears to be &lt;CODE&gt;type&lt;/CODE&gt; whereas in the .csv field, field name is &lt;CODE&gt;devicetype&lt;/CODE&gt; For your subsearch to work, the two needs to be the same. So you could either rename the field in the .csv by editing it, or you could try your search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main |search [|inputlookup test.csv |rename devicetype AS type | fields type]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Aug 2016 12:18:04 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-15T12:18:04Z</dc:date>
    <item>
      <title>Splunk search using CSV file data as input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224794#M98930</link>
      <description>&lt;P&gt;I would like to search &lt;/P&gt;

&lt;P&gt;index=main   type=router OR type=switch  OR type=firewall OR type=sysproxy ..&lt;/P&gt;

&lt;P&gt;Instead i wanna do as below&lt;BR /&gt;
test.csv&lt;BR /&gt;
devicetype&lt;BR /&gt;
router&lt;BR /&gt;
switch&lt;BR /&gt;
firewall&lt;BR /&gt;
sysproxy&lt;BR /&gt;
webproxy&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;index=main |search [|inputlookup test.csv |feilds devicetype]&lt;/P&gt;

&lt;P&gt;It does not return the output. Can you please help how to get the results.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 05:37:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224794#M98930</guid>
      <dc:creator>psalibindla9524</dc:creator>
      <dc:date>2016-08-15T05:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search using CSV file data as input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224795#M98931</link>
      <description>&lt;P&gt;In you first search example, the field name appears to be &lt;CODE&gt;type&lt;/CODE&gt; whereas in the .csv field, field name is &lt;CODE&gt;devicetype&lt;/CODE&gt; For your subsearch to work, the two needs to be the same. So you could either rename the field in the .csv by editing it, or you could try your search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main |search [|inputlookup test.csv |rename devicetype AS type | fields type]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 12:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224795#M98931</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T12:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search using CSV file data as input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224796#M98932</link>
      <description>&lt;P&gt;Since sundareshr was first to answer (in a comment), I'm demoting my answer to a comment. The solution is indeed correct, but you can shorten it a bit:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main [|inputlookup test.csv |rename devicetype AS type | fields type]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(oh, and I had a typo in my answer... Fixed now.)&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 12:43:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224796#M98932</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2016-08-15T12:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search using CSV file data as input</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224797#M98933</link>
      <description>&lt;P&gt;There is also a typo "|feilds devicetype]"&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 14:39:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-using-CSV-file-data-as-input/m-p/224797#M98933</guid>
      <dc:creator>tjrhodeback</dc:creator>
      <dc:date>2017-06-14T14:39:42Z</dc:date>
    </item>
  </channel>
</rss>

