<?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 edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253519#M75861</link>
    <description>&lt;P&gt;Learn something new everyday &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Please close out the question by accepting the answer.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2016 17:44:38 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-29T17:44:38Z</dc:date>
    <item>
      <title>How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253514#M75856</link>
      <description>&lt;P&gt;I am trying to match the fields countrycode (An eval field extracted from indexed data) with a field "Code" in a CSV file, get the corresponding "branch_name" from the CSV, and display it along with certain fields that are indexed. Here is my current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;inputcsv sample_csv.csv [ search index="logs" | eval country_code=substr(server_name,3,3) | table  country_code ] | eval Branch=if(Code,country_code,Branch_name) | table Branch, ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it is not working. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253514#M75856</guid>
      <dc:creator>sushmitha_mj</dc:creator>
      <dc:date>2016-08-29T17:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253515#M75857</link>
      <description>&lt;P&gt;Have you considered using Lookups? How frequently does your csv file change?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253515#M75857</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-29T17:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253516#M75858</link>
      <description>&lt;P&gt;The CSV does not change. I did not consider using a lookup. Is that the only option. Can I not do it with a simple query connecting the two sources? &lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253516#M75858</guid>
      <dc:creator>sushmitha_mj</dc:creator>
      <dc:date>2016-08-29T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253517#M75859</link>
      <description>&lt;P&gt;Lookup table is your best option, but if you choose not to use lookups, try this (i have never used this)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="logs" | eval country_code=substr(server_name,3,3) | append [inputcsv sample_csv.csv |rename Code as country_code ] | stats values(Branch_Name) as Branch_name by country_code
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253517#M75859</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-29T17:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253518#M75860</link>
      <description>&lt;P&gt;It actually works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
I also created a lookup table (Just added the csv files as a lookup table). Just curious, how can I extract the same info using the lookup table? &lt;/P&gt;

&lt;P&gt;I checked the doc you sent me, but I did not get it. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:43:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253518#M75860</guid>
      <dc:creator>sushmitha_mj</dc:creator>
      <dc:date>2016-08-29T17:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253519#M75861</link>
      <description>&lt;P&gt;Learn something new everyday &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Please close out the question by accepting the answer.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253519#M75861</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-29T17:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253520#M75862</link>
      <description>&lt;P&gt;For lookup table, here are the steps&lt;/P&gt;

&lt;P&gt;1) Create lookup table. Set appropriate permissions (app level,maybe)&lt;BR /&gt;
2) Create lookup definition. Set appropriate permissions (app level,maybe)&lt;BR /&gt;
3) Use in search, like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | eval code=substr(server_name,3,3) | lookup lookupfiledefinitonname Code as code OUTPUT Branch_name | rest of your query
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253520#M75862</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-29T17:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253521#M75863</link>
      <description>&lt;P&gt;Awesome.. thanks &lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 13:37:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253521#M75863</guid>
      <dc:creator>sushmitha_mj</dc:creator>
      <dc:date>2016-08-30T13:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253522#M75864</link>
      <description>&lt;P&gt;Hey @sundareshr &lt;BR /&gt;
I have been using the above query, it is working, I wanted to add a couple of more fields to the result set like Server_name, type etc. These fields are present in the indexed data . But when I add those fields the result set is giving me all the fields in the csv and not restricting the result set to the time filter. How can I enhance the query ? &lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253522#M75864</guid>
      <dc:creator>sushmitha_mj</dc:creator>
      <dc:date>2016-09-16T20:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match fields from indexed data with a field in a CSV file to output another corresponding field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253523#M75865</link>
      <description>&lt;P&gt;For using time as a filter, you have to configure your lookup as time-based lookup&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/Knowledge/Configureatime-boundedlookup"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/Knowledge/Configureatime-boundedlookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:27:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-fields-from-indexed-data-with-a/m-p/253523#M75865</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-16T20:27:13Z</dc:date>
    </item>
  </channel>
</rss>

