<?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 SPL on an scenario in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483685#M193348</link>
    <description>&lt;P&gt;Hi @naliniasb:&lt;/P&gt;

&lt;P&gt;can ou try by &lt;STRONG&gt;&lt;EM&gt;join&lt;/EM&gt;&lt;/STRONG&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval HRA="AAAA,BBBB,CCCC"
| eval HRA=split(HRA,",")
| mvexpand HRA
| join type=left HRA [| makeresults 
| eval HRA="DDDD,BBBB,CCCC"
| eval HRA=split(HRA,",")
| mvexpand HRA
| eval HRK=HRA | table HRA, HRK]
| eval HRK=if(isnull(HRK),"yet to be applied",HRK)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 Jan 2020 10:40:06 GMT</pubDate>
    <dc:creator>TISKAR</dc:creator>
    <dc:date>2020-01-16T10:40:06Z</dc:date>
    <item>
      <title>SPLUNK SPL on an scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483684#M193347</link>
      <description>&lt;P&gt;Have 2 DB connection and i want to compare the DB1 connection HRA field keeping as primary key say here in this example &lt;BR /&gt;
it is HRA field with DB2 connection ex below field is HRK ,so that it compares with all the data values and if present it should give HRA field value else "yet to be applied"&lt;BR /&gt;
Sample query to explain the scenario::&lt;BR /&gt;
| makeresults &lt;BR /&gt;
| eval HRA="AAAA,BBBB,CCCC" &lt;BR /&gt;
| eval HRA=split(HRA,",") &lt;BR /&gt;
| mvexpand HRA&lt;BR /&gt;&lt;BR /&gt;
|append [| makeresults  |search&lt;BR /&gt;
    | eval HRK="DDDD,BBBB,CCCC" &lt;BR /&gt;
    | eval HRK=split(HRK,",") &lt;BR /&gt;
    | mvexpand HRK]&lt;BR /&gt;
expected  output of this will be as below:&lt;BR /&gt;
HRA                                                   HRK                            _time&lt;BR /&gt;
AAAA                                                yet to be applied&lt;BR /&gt;
BBBB                                               BBBB&lt;BR /&gt;
CCCC                                               CCCC&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 06:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483684#M193347</guid>
      <dc:creator>naliniasb</dc:creator>
      <dc:date>2020-01-16T06:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK SPL on an scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483685#M193348</link>
      <description>&lt;P&gt;Hi @naliniasb:&lt;/P&gt;

&lt;P&gt;can ou try by &lt;STRONG&gt;&lt;EM&gt;join&lt;/EM&gt;&lt;/STRONG&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval HRA="AAAA,BBBB,CCCC"
| eval HRA=split(HRA,",")
| mvexpand HRA
| join type=left HRA [| makeresults 
| eval HRA="DDDD,BBBB,CCCC"
| eval HRA=split(HRA,",")
| mvexpand HRA
| eval HRK=HRA | table HRA, HRK]
| eval HRK=if(isnull(HRK),"yet to be applied",HRK)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jan 2020 10:40:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483685#M193348</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2020-01-16T10:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK SPL on an scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483686#M193349</link>
      <description>&lt;P&gt;nope this is not going to work under join you have given same HRA which is not expected&lt;BR /&gt;
i have 2 DB connection and my requirement is with one of primary key field i need to compare the other DB connection with field(all the values in that field) and say if present then keep same value if not set "yet to be applied"&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 12:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483686#M193349</guid>
      <dc:creator>naliniasb</dc:creator>
      <dc:date>2020-01-17T12:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK SPL on an scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483687#M193350</link>
      <description>&lt;P&gt;Can anyone suggest on this&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 10:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483687#M193350</guid>
      <dc:creator>naliniasb</dc:creator>
      <dc:date>2020-01-20T10:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK SPL on an scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483688#M193351</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval HRA="AAAA,BBBB,CCCC"
| eval HRA=split(HRA,",")
| mvexpand HRA
|append [| makeresults |search
| eval HRK="DDDD,BBBB,CCCC"
| eval HRK=split(HRK,",")
| mvexpand HRK]
| appendpipe
    [ eval tmp=coalesce(HRA,HRK)
    | selfjoin tmp]
    | streamstats count
    | reverse
    | dedup HRA
    | sort count
    | table HRA HRK _time
    | fillnull value="yet to be applied"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @naliniasb &lt;BR /&gt;
I make the query from your sample. how about this?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SPLUNK-SPL-on-an-scenario/m-p/483688#M193351</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-20T12:41:21Z</dc:date>
    </item>
  </channel>
</rss>

