<?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 replace join in this query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533151#M150636</link>
    <description>&lt;P&gt;I was informed that it's sourcetypes and not in the _raw.&amp;nbsp; Here's the adjusted solution:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index=168347-np 
    ([| `last_np_sourcetype("index=168347-np","hardware")`] (physicalType=*)) OR
    ([| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=290681)
| fields physicalElementId deviceId sourcetype
| stats values(sourcetype) as sourcetype values(physicalElementId) as physicalElementId by deviceId
| search sourcetype=hardware sourcetype=group_members
| stats dc(physicalElementId) as Devices&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 15 Dec 2020 13:59:59 GMT</pubDate>
    <dc:creator>dmarling</dc:creator>
    <dc:date>2020-12-15T13:59:59Z</dc:date>
    <item>
      <title>how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/532977#M150559</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyone please help me in rewplacing join in this below query&lt;/P&gt;&lt;P&gt;index=168347-np [ | `last_np_sourcetype("index=168347-np","hardware")`] (physicalType=*) | fields physicalElementId deviceId&lt;BR /&gt;| join deviceId [ search index=168347-np [| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=300543 | fields deviceId ]&lt;BR /&gt;| stats dc(physicalElementId) as Devices&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 11:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/532977#M150559</guid>
      <dc:creator>pstalin_</dc:creator>
      <dc:date>2020-12-14T11:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/532985#M150564</link>
      <description>&lt;P&gt;Anyone please help me on this&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:35:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/532985#M150564</guid>
      <dc:creator>pstalin_</dc:creator>
      <dc:date>2020-12-14T13:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533048#M150587</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229380"&gt;@pstalin_&lt;/a&gt;&amp;nbsp;, please try this;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=168347-np 
    [| `last_np_sourcetype("index=168347-np","hardware")`] OR ( 
    [| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=300543) 
| stats dc(physicalElementId) as Devices&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 18:30:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533048#M150587</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2020-12-14T18:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533091#M150603</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"index=168347-np [ | `last_np_sourcetype("index=168347-np","hardware")`] (physicalType=*) | fields physicalElementId deviceId&lt;BR /&gt;| join deviceId [ search index=168347-np [| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=290681 | fields deviceId ]&lt;BR /&gt;| stats dc(physicalElementId) as Devices"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This queries contains the fields&amp;nbsp;physicalElementId deviceId and deviceid has common but U didn't used this in your query I'm getting different answer.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 04:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533091#M150603</guid>
      <dc:creator>pstalin_</dc:creator>
      <dc:date>2020-12-15T04:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533138#M150630</link>
      <description>&lt;P&gt;In order to properly answer this question we need to know how the "hardware" and "group_members" are being used in the last_np_sourcetype macro.&amp;nbsp; Is there a specific field where those values are being searched?&amp;nbsp; Is it just in the raw event somewhere?&amp;nbsp; If it is in the raw event then the below query would work but it's not as efficient as it would be if we knew the exact field that these values are expected in:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index=168347-np 
    ([| `last_np_sourcetype("index=168347-np","hardware")`] (physicalType=*)) OR
    ([| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=290681)
| fields physicalElementId deviceId _raw
| stats values(_raw) as raw values(physicalElementId) as physicalElementId by deviceId
| search raw=*hardware* raw=*group_members*
| stats dc(physicalElementId) as Devices&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:29:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533138#M150630</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2020-12-15T13:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533151#M150636</link>
      <description>&lt;P&gt;I was informed that it's sourcetypes and not in the _raw.&amp;nbsp; Here's the adjusted solution:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;index=168347-np 
    ([| `last_np_sourcetype("index=168347-np","hardware")`] (physicalType=*)) OR
    ([| `last_np_sourcetype( "index=168347-np", "group_members")` ] groupId=290681)
| fields physicalElementId deviceId sourcetype
| stats values(sourcetype) as sourcetype values(physicalElementId) as physicalElementId by deviceId
| search sourcetype=hardware sourcetype=group_members
| stats dc(physicalElementId) as Devices&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533151#M150636</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2020-12-15T13:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533266#M150667</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/215385"&gt;@dmarling&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think its working thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 03:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533266#M150667</guid>
      <dc:creator>pstalin_</dc:creator>
      <dc:date>2020-12-16T03:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to replace join in this query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533273#M150669</link>
      <description>&lt;P&gt;I'm glad it's working.&amp;nbsp; Please mark the solution as accepted to help future individuals.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 05:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-replace-join-in-this-query/m-p/533273#M150669</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2020-12-16T05:41:09Z</dc:date>
    </item>
  </channel>
</rss>

