<?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 Search w/Inputlookup Subsearch Not Working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548565#M155607</link>
    <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I am new to Splunk and trying to get a search query with subsearch to work. Here is what I have so far:&lt;/P&gt;&lt;P&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json&lt;BR /&gt;| search "DOS CCD"&lt;BR /&gt;| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH&lt;BR /&gt;| spath output=search_values path=requestParams.primaryInputs{0}.values{0}&lt;BR /&gt;| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title&lt;BR /&gt;| table time data_sources search_values&lt;/P&gt;&lt;P&gt;The above returns two results at runtime with "DOS CCD" as one or more of values in the data_sources field and i also have a "time" field (doesn't appear to be a reserved word) and a search_values field&lt;/P&gt;&lt;P&gt;I want to replace the second line of the main search with a subsearch using the below. The .csv lookup file has three columns of which I am returning "DataSource"&lt;/P&gt;&lt;P&gt;|inputlookup Palantir_T3_Collection_Lookup_JSON.csv&lt;BR /&gt;|rename DataSource as data_sources&lt;BR /&gt;|table data_sources&lt;/P&gt;&lt;P&gt;This runs fine and gets the value "DOS CCD" from the lookup file with no problem, but when I try and pass this result into the main search like this I get no results:&lt;/P&gt;&lt;P&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json&lt;BR /&gt;[|inputlookup Palantir_T3_Collection_Lookup_JSON.csv&lt;BR /&gt;|rename DataSource as data_sources&lt;BR /&gt;|table data_sources]&lt;BR /&gt;| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH&lt;BR /&gt;| spath output=search_values path=requestParams.primaryInputs{0}.values{0}&lt;BR /&gt;| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title&lt;BR /&gt;| table time data_sources search_values&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 10:13:40 GMT</pubDate>
    <dc:creator>Kevin_S</dc:creator>
    <dc:date>2021-04-20T10:13:40Z</dc:date>
    <item>
      <title>Search w/Inputlookup Subsearch Not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548565#M155607</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I am new to Splunk and trying to get a search query with subsearch to work. Here is what I have so far:&lt;/P&gt;&lt;P&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json&lt;BR /&gt;| search "DOS CCD"&lt;BR /&gt;| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH&lt;BR /&gt;| spath output=search_values path=requestParams.primaryInputs{0}.values{0}&lt;BR /&gt;| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title&lt;BR /&gt;| table time data_sources search_values&lt;/P&gt;&lt;P&gt;The above returns two results at runtime with "DOS CCD" as one or more of values in the data_sources field and i also have a "time" field (doesn't appear to be a reserved word) and a search_values field&lt;/P&gt;&lt;P&gt;I want to replace the second line of the main search with a subsearch using the below. The .csv lookup file has three columns of which I am returning "DataSource"&lt;/P&gt;&lt;P&gt;|inputlookup Palantir_T3_Collection_Lookup_JSON.csv&lt;BR /&gt;|rename DataSource as data_sources&lt;BR /&gt;|table data_sources&lt;/P&gt;&lt;P&gt;This runs fine and gets the value "DOS CCD" from the lookup file with no problem, but when I try and pass this result into the main search like this I get no results:&lt;/P&gt;&lt;P&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json&lt;BR /&gt;[|inputlookup Palantir_T3_Collection_Lookup_JSON.csv&lt;BR /&gt;|rename DataSource as data_sources&lt;BR /&gt;|table data_sources]&lt;BR /&gt;| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH&lt;BR /&gt;| spath output=search_values path=requestParams.primaryInputs{0}.values{0}&lt;BR /&gt;| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title&lt;BR /&gt;| table time data_sources search_values&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 10:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548565#M155607</guid>
      <dc:creator>Kevin_S</dc:creator>
      <dc:date>2021-04-20T10:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Search w/Inputlookup Subsearch Not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548567#M155608</link>
      <description>&lt;P&gt;At the time you are doing the inputlookup data_sources hasn't been extracted - when you put the inputlookup in square brackets that equates to data_sources="A" OR data_sources="B" etc i.e. name of field returned by sub-query with each of the values returned by the inputlookup. You colud try renaming&amp;nbsp;&lt;SPAN&gt;DataSource&amp;nbsp;to "resultParams.additionalContent{}.resources{}.title" (or something like that) but I am not sure it would work, or move the search to after the field has been extracted&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 10:30:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548567#M155608</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-20T10:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search w/Inputlookup Subsearch Not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548576#M155611</link>
      <description>&lt;P&gt;Thanks! I tried moving the subsearch to after the field has been extracted - which I assume is after the "| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH" line?&lt;BR /&gt;No luck so far..&lt;BR /&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json&lt;BR /&gt;[|inputlookup Palantir_T3_Collection_Lookup_JSON.csv&lt;BR /&gt;|rename DataSource as data_sources&lt;BR /&gt;|table data_sources]&lt;BR /&gt;| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH&lt;BR /&gt;| spath output=search_values path=requestParams.primaryInputs{0}.values{0}&lt;BR /&gt;| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title&lt;BR /&gt;| table time data_sources search_values&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548576#M155611</guid>
      <dc:creator>Kevin_S</dc:creator>
      <dc:date>2021-04-20T12:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search w/Inputlookup Subsearch Not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548582#M155613</link>
      <description>&lt;P&gt;No,&amp;nbsp;you need to put it after the spath extract&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=palantir_audit host="merlin.palantir.abc.ncc" sourcetype=_json
| search "requestParams.primaryInputs{}.type"=SEARCH_TERMS name=SEARCH
| spath output=search_values path=requestParams.primaryInputs{0}.values{0}
| spath output=data_sources path=resultParams.additionalContent{}.resources{}.title

| search [|inputlookup Palantir_T3_Collection_Lookup_JSON.csv
|rename DataSource as data_sources
|table data_sources]

| table time data_sources search_values&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548582#M155613</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-20T12:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Search w/Inputlookup Subsearch Not Working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548592#M155622</link>
      <description>&lt;P&gt;Yes!!!! thanks so much. That worked!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 14:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-w-Inputlookup-Subsearch-Not-Working/m-p/548592#M155622</guid>
      <dc:creator>Kevin_S</dc:creator>
      <dc:date>2021-04-20T14:09:44Z</dc:date>
    </item>
  </channel>
</rss>

