<?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 use two datasets in a query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565872#M5549</link>
    <description>&lt;P&gt;So how to add the user field from xdr_data into my query?&amp;nbsp; Thanks for your help&lt;/P&gt;
&lt;P&gt;config case_sensitive = false &lt;BR /&gt;| dataset in (host_inventory, xdr_data)&lt;BR /&gt;| fields host_name, applications&lt;BR /&gt;| arrayexpand applications | alter readable_application_name = json_extract(applications, "$.application_name")&lt;BR /&gt;| fields readable_application_name, host_name&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 17:56:17 GMT</pubDate>
    <dc:creator>RiveraMarco</dc:creator>
    <dc:date>2023-11-15T17:56:17Z</dc:date>
    <item>
      <title>How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565870#M5547</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I hope you can shed some light.&amp;nbsp; I am attempting to run a query to find out what system is running what applications including the username.&lt;/P&gt;
&lt;P&gt;I have this query which gives me what I need except the "user" which is a field in another dataset xdr_data.&amp;nbsp; How can add this new dataset to get the "user" field?&amp;nbsp; Thank you&lt;/P&gt;
&lt;P&gt;config case_sensitive = false &lt;BR /&gt;| dataset = host_inventory &lt;BR /&gt;| fields host_name, applications&lt;BR /&gt;| arrayexpand applications | alter readable_application_name = json_extract(applications, "$.application_name")&lt;BR /&gt;| fields readable_application_name, host_name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:43:50 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565870#M5547</guid>
      <dc:creator>RiveraMarco</dc:creator>
      <dc:date>2023-11-15T17:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565871#M5548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/221132"&gt;@RiveraMarco&lt;/a&gt;&amp;nbsp;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;You can call two datasets using the "in" operator.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset in (xdr_data, panw_ngfw_traffic_raw )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:47:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565871#M5548</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2023-11-15T17:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565872#M5549</link>
      <description>&lt;P&gt;So how to add the user field from xdr_data into my query?&amp;nbsp; Thanks for your help&lt;/P&gt;
&lt;P&gt;config case_sensitive = false &lt;BR /&gt;| dataset in (host_inventory, xdr_data)&lt;BR /&gt;| fields host_name, applications&lt;BR /&gt;| arrayexpand applications | alter readable_application_name = json_extract(applications, "$.application_name")&lt;BR /&gt;| fields readable_application_name, host_name&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:56:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565872#M5549</guid>
      <dc:creator>RiveraMarco</dc:creator>
      <dc:date>2023-11-15T17:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565873#M5550</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310428"&gt;@jmazzeo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So how to add the user field from xdr_data into my query?&amp;nbsp; Thanks for your help&lt;/P&gt;
&lt;P&gt;config case_sensitive = false&lt;BR /&gt;| dataset in (host_inventory, xdr_data)&lt;BR /&gt;| fields host_name, applications&lt;BR /&gt;| arrayexpand applications | alter readable_application_name = json_extract(applications, "$.application_name")&lt;BR /&gt;| fields readable_application_name, host_name&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 17:59:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565873#M5550</guid>
      <dc:creator>RiveraMarco</dc:creator>
      <dc:date>2023-11-15T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565968#M5557</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/221132"&gt;@RiveraMarco&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may try this and edit this query based on your requirements:&lt;BR /&gt;&lt;BR /&gt;config case_sensitive = false&lt;BR /&gt;| dataset = host_inventory &lt;BR /&gt;| fields host_name, applications&lt;BR /&gt;| arrayexpand applications &lt;BR /&gt;| alter readable_application_name = json_extract(applications, "$.application_name")&lt;BR /&gt;| alter app_name = trim (readable_application_name ,"\"")&lt;BR /&gt;| fields app_name &lt;BR /&gt;| join type = inner (dataset= xdr_data | fields actor_process_image_name , os_actor_process_image_name , action_file_name , actor_primary_username , causality_actor_process_image_name ) as aip aip.actor_process_image_name contains app_name &lt;BR /&gt;| filter (actor_primary_username != """NT AUTHORITY\\SYSTEM""") &lt;BR /&gt;| dedup app_name , actor_primary_username , actor_process_image_name &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PiyushKohli_0-1700132520171.png" style="width: 404px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/55229iB3E81ED4A2BA17D0/image-dimensions/404x103/is-moderation-mode/true?v=v2" width="404" height="103" role="button" title="PiyushKohli_0-1700132520171.png" alt="PiyushKohli_0-1700132520171.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to write back if you have further query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Please mark the response as "Accept as Solution" if it answers your query.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 11:02:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/565968#M5557</guid>
      <dc:creator>PiyushKohli</dc:creator>
      <dc:date>2023-11-16T11:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two datasets in a query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/566022#M5559</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 16:54:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/how-to-use-two-datasets-in-a-query/m-p/566022#M5559</guid>
      <dc:creator>RiveraMarco</dc:creator>
      <dc:date>2023-11-16T16:54:42Z</dc:date>
    </item>
  </channel>
</rss>

