<?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: Table joins for this scenario in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510549#M34026</link>
    <description>&lt;P&gt;sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
    | eval _raw="Job1, Job2, Job3
ccc,eee,zzz
ddd,fff,aaa" 
    | multikv forceheader=1 
    | table Job*
    | eval header="Job"
    | untable header job thing
    | streamstats count(eval(job="Job1")) as session
    | append [| makeresults 
| eval _raw="Job,Id
aaa,1234
ccc,2345
ddd,9879
fff,6743
eee,8754
zzz,4006" 
| multikv forceheader=1 
| table Job Id ]
| eval thing=coalesce(thing,Job)
| selfjoin thing
| sort session job
| eval {job}=thing
| table session Job1 Job2 Job3 Id
| streamstats count as number by session
| foreach number [| eval Id{&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;} = Id]
| stats values(Job*) as Job* values(Id*) as Id* by session
| table Job1 Id1 Job2 Id2 Job3 Id3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;recommend:&lt;/P&gt;&lt;P&gt;| inputlookup yourlookup&lt;BR /&gt;| eval header= .... | append [search yoursearch ] | eval thing= ....&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jul 2020 22:22:37 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-07-22T22:22:37Z</dc:date>
    <item>
      <title>How to joins Tables for this scenario?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510544#M34025</link>
      <description>&lt;P&gt;Search results&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Job,Id

aaa,1234

ccc,2345

ddd,9879

fff,6743

eee,8754

zzz,4006&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Lookup file&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Job1, Job2 , Job3

ccc,eee,zzz

ddd,fff,aaa&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output table should look like below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Job1,id1,Job2,id2,Job3,id3

ccc,2345,eee,8754,zzz,4006

ddd,9879,fff,6743,aaa,1234&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Tried join, append, appendcols but all are returning incorrect results&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 04:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510544#M34025</guid>
      <dc:creator>Shan1490</dc:creator>
      <dc:date>2020-07-23T04:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table joins for this scenario</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510549#M34026</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
    | eval _raw="Job1, Job2, Job3
ccc,eee,zzz
ddd,fff,aaa" 
    | multikv forceheader=1 
    | table Job*
    | eval header="Job"
    | untable header job thing
    | streamstats count(eval(job="Job1")) as session
    | append [| makeresults 
| eval _raw="Job,Id
aaa,1234
ccc,2345
ddd,9879
fff,6743
eee,8754
zzz,4006" 
| multikv forceheader=1 
| table Job Id ]
| eval thing=coalesce(thing,Job)
| selfjoin thing
| sort session job
| eval {job}=thing
| table session Job1 Job2 Job3 Id
| streamstats count as number by session
| foreach number [| eval Id{&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;} = Id]
| stats values(Job*) as Job* values(Id*) as Id* by session
| table Job1 Id1 Job2 Id2 Job3 Id3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;recommend:&lt;/P&gt;&lt;P&gt;| inputlookup yourlookup&lt;BR /&gt;| eval header= .... | append [search yoursearch ] | eval thing= ....&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 22:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510549#M34026</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-22T22:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Table joins for this scenario</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510571#M34027</link>
      <description>&lt;P&gt;Hi to4kawa,&lt;/P&gt;&lt;P&gt;I have mentioned only 6 sample records, there are more than 500+ records as part of my search and in lookup file as well&lt;/P&gt;&lt;P&gt;Also I can't append my search because the search is based on two different lookup. in that case how to use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;recommend:&lt;/P&gt;&lt;P&gt;| inputlookup yourlookup&lt;BR /&gt;| eval header= .... | append [search yoursearch ] | eval thing= ....&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 04:09:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510571#M34027</guid>
      <dc:creator>Shan1490</dc:creator>
      <dc:date>2020-07-23T04:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Table joins for this scenario</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510606#M34028</link>
      <description>&lt;P&gt;Is there a problem with my query?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 09:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510606#M34028</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-23T09:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Table joins for this scenario</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510702#M34032</link>
      <description>&lt;P&gt;Search results&lt;/P&gt;&lt;P&gt;Index=appln sourcetype=alog|lookup abc.csv..........| eval.....|eval.....| values(Job) ,values(id)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above search results 600+ rows in below format&lt;/P&gt;&lt;PRE&gt;Job,Id

aaa,1234

ccc,2345

ddd,9879

fff,6743

eee,8754

zzz,4006&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lookupfile (has 600+ rows)&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;Job1, Job2 , Job3

ccc,eee,zzz

ddd,fff,aaa&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output table should look like below(600 + rows)&lt;/P&gt;&lt;PRE&gt;Job1,id1,Job2,id2,Job3,id3

ccc,2345,eee,8754,zzz,4006

ddd,9879,fff,6743,aaa,1234&lt;/PRE&gt;&lt;P&gt;In the above case how will I get id1, id2 ,id3 results from above search by joining with lookup file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 17:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510702#M34032</guid>
      <dc:creator>Shan1490</dc:creator>
      <dc:date>2020-07-23T17:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table joins for this scenario</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510703#M34033</link>
      <description>&lt;P&gt;&lt;SPAN&gt;your query doesn't use my query's method. and I'm not sure your query.&lt;BR /&gt;&lt;BR /&gt;What's the problem with &lt;STRONG&gt;my&lt;/STRONG&gt; query?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 17:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-joins-Tables-for-this-scenario/m-p/510703#M34033</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-23T17:36:03Z</dc:date>
    </item>
  </channel>
</rss>

