<?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: Can I chain fields together between two different lookups (.csv files)? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106803#M22470</link>
    <description>&lt;P&gt;I agree with lguinn, below are my lookup setting in props.conf , I am sure they works :&lt;/P&gt;

&lt;P&gt;LOOKUP_1 = service_tree SERVICE_ID AS LOG_PAGE HANDSETTYPE as Platform OUTPUT NAME AS SERVICE_NAME_L10, PARENT_ID AS SERVICE_PARENT_ID_L9&lt;/P&gt;

&lt;P&gt;LOOKUP_2 = service_tree SERVICE_ID as SERVICE_PARENT_ID_L9 HANDSETTYPE as Platform OUTPUT NAME as SERVICE_NAME_L9, PARENT_ID as SERVICE_PARENT_ID_L8&lt;/P&gt;

&lt;P&gt;LOOKUP_3 = service_tree SERVICE_ID as SERVICE_PARENT_ID_L8 HANDSETTYPE as Platform OUTPUT NAME as SERVICE_NAME_L8, PARENT_ID as SERVICE_PARENT_ID_L7&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:36:28 GMT</pubDate>
    <dc:creator>dmlee</dc:creator>
    <dc:date>2020-09-28T09:36:28Z</dc:date>
    <item>
      <title>Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106797#M22464</link>
      <description>&lt;P&gt;Can I perform a lookup using one csv file and then use a returned field from that one to perform a second lookup in a different csv file?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2011 21:37:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106797#M22464</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2011-05-20T21:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106798#M22465</link>
      <description>&lt;P&gt;Yes, you can!  When I did it, I defined the fields in the csv file with matching names, to avoid having to rename fields. I also created the definitions in order.  First I created the lookup that used a field from the event to match a field in lookup table A.  Then I defined a second lookup, which used the field name that was created in lookup table A to find a field in lookup table B.  In other words&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Event field X -&amp;gt; Lookup Table A field Y -&amp;gt; Lookup Table B field Z

LookupTable A has 2 fields: X,Y
Lookup Table B has 2 fields: Y,Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After the automatic lookups were set up, fields X, Y and Z were all available in the field picker.&lt;/P&gt;

&lt;P&gt;I don't know if order matters in the configuration files for lookups, but it might.  I'd also be careful that you have 1-to-1 matching; this might not work with a 1-to-many match.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2011 01:00:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106798#M22465</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-05-21T01:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106799#M22466</link>
      <description>&lt;P&gt;This doesn't seem to work. Here's the way I configured it, maybe you can tell me where I went wrong.&lt;/P&gt;

&lt;P&gt;I have two .csv files, &lt;CODE&gt;user_lookup&lt;/CODE&gt; (referencing the first .csv) containing a column with &lt;CODE&gt;UserID&lt;/CODE&gt; and &lt;CODE&gt;Department&lt;/CODE&gt;. The second, &lt;CODE&gt;department_lookup&lt;/CODE&gt; contains &lt;CODE&gt;DivDept&lt;/CODE&gt; and &lt;CODE&gt;DivisionDepartmentName&lt;/CODE&gt;. &lt;CODE&gt;DivDept&lt;/CODE&gt; corresponds to values from &lt;CODE&gt;Department&lt;/CODE&gt; and vice versa. The first lookup works, as the &lt;CODE&gt;Department&lt;/CODE&gt; field shows up properly in my searches.&lt;/P&gt;

&lt;P&gt;First lookup I used was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;WinEventLog:Security : LOOKUP-user_department_lookup  user_lookup UserID AS Account_Name OUTPUTNEW Department AS Department  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then I set up the second lookup:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;WinEventLog:Security : LOOKUP-map_dept_to_divdept  department_lookup DivDept AS Department OUTPUTNEW DivisionDepartmentName AS DivDept  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But no matter how I rearrange this, I can only get the first lookup to work. As it is, it doesn't throw an error, but the second lookup isn't producing any new fields. I also tried mapping the second lookup to overwrite the fields produced by the first, but that didn't work either. Suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2011 13:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106799#M22466</guid>
      <dc:creator>smuld2</dc:creator>
      <dc:date>2011-05-24T13:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106800#M22467</link>
      <description>&lt;P&gt;This can easily be done via props.conf, but it is imperative that the lookups are run in the proper order.  The easiest way to make sure they are run in the proper order is to use alphanumeric precedence via property names:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;## props.conf
LOOKUP-0first_lookup = my_first_lookup A OUTPUT B
LOOKUP-1second_lookup = my_second_lookup B OUTPUT C
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2011 20:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106800#M22467</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-05-24T20:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106801#M22468</link>
      <description>&lt;P&gt;I &lt;EM&gt;thought&lt;/EM&gt; that Splunk would do the lookups in a particular order, but I didn't have time to research it.&lt;/P&gt;

&lt;P&gt;Thanks for explaining this.&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2011 21:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106801#M22468</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-05-24T21:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106802#M22469</link>
      <description>&lt;P&gt;Find the props.conf file that contains the lookups you have configured.  Look at hazekamp's answer below.  Note the numbers in the LOOLIP-xx entries.  Name your first lookup: LOOKUP-0user_department_lookup.  Name the second on: LOOKUP-1map_dept_to_divdept.&lt;/P&gt;

&lt;P&gt;I think Splunk runs your lookups in the wrong order because "map_dept..." comes before "user_dep..." in the ASCII sort.&lt;/P&gt;

&lt;P&gt;Also, you use  DivDept twice in the second lookup.  That might also be a problem; shouldn't it be &lt;/P&gt;

&lt;P&gt;LOOKUP-map_dept_to_divdept  department_lookup &lt;STRONG&gt;Department&lt;/STRONG&gt; AS Department OUTPUTNEW DivisionDepartmentName AS DivDept&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:36:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106802#M22469</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T09:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106803#M22470</link>
      <description>&lt;P&gt;I agree with lguinn, below are my lookup setting in props.conf , I am sure they works :&lt;/P&gt;

&lt;P&gt;LOOKUP_1 = service_tree SERVICE_ID AS LOG_PAGE HANDSETTYPE as Platform OUTPUT NAME AS SERVICE_NAME_L10, PARENT_ID AS SERVICE_PARENT_ID_L9&lt;/P&gt;

&lt;P&gt;LOOKUP_2 = service_tree SERVICE_ID as SERVICE_PARENT_ID_L9 HANDSETTYPE as Platform OUTPUT NAME as SERVICE_NAME_L9, PARENT_ID as SERVICE_PARENT_ID_L8&lt;/P&gt;

&lt;P&gt;LOOKUP_3 = service_tree SERVICE_ID as SERVICE_PARENT_ID_L8 HANDSETTYPE as Platform OUTPUT NAME as SERVICE_NAME_L8, PARENT_ID as SERVICE_PARENT_ID_L7&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:36:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106803#M22470</guid>
      <dc:creator>dmlee</dc:creator>
      <dc:date>2020-09-28T09:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106804#M22471</link>
      <description>&lt;P&gt;Looks like that solved everything. Seems the items in the config file are handled alphabetically, not based on the order they appear in the file.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2011 13:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106804#M22471</guid>
      <dc:creator>smuld2</dc:creator>
      <dc:date>2011-05-25T13:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I chain fields together between two different lookups (.csv files)?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106805#M22472</link>
      <description>&lt;P&gt;That is almost correct - they are handled in ASCII order, so watch out for case --upper case sorts ahead of lowercase.&lt;/P&gt;

&lt;P&gt;When order of processing is important, I always number the lookups.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2011 18:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-chain-fields-together-between-two-different-lookups-csv/m-p/106805#M22472</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2011-06-02T18:45:10Z</dc:date>
    </item>
  </channel>
</rss>

