<?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: Use 2 datasets in the same XQL query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/618729#M7427</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand better now, thank you for taking the time to answer my questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it will help a lot of people &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 11:14:57 GMT</pubDate>
    <dc:creator>CyrilBondenetVC</dc:creator>
    <dc:date>2024-11-15T11:14:57Z</dc:date>
    <item>
      <title>Use 2 datasets in the same XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617531#M7420</link>
      <description>&lt;P&gt;Hello, I would like to be able to use the dataset “xdr_data &amp;amp; endpoint” in the same query.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here's my query :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset = xdr_data&lt;BR /&gt;| filter event_type = ENUM.FILE and event_sub_type = ENUM.FILE_OPEN &lt;BR /&gt;| alter Drive_Type = json_extract(to_json_string(action_file_device_info),"$.storage_device_drive_type"), Filesystem = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_filesystem"), Drive_Letter = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_mount_point"), Device_Serial_Number = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_serial_number") // Getting details about the device a file was created on&lt;BR /&gt;| filter drive_type = "2" // Filtering by drive type 2 which is 'Removable Media'&lt;BR /&gt;| fields action_file_path as File_Path, actor_effective_username as Username, Filesystem, Drive_Letter, Device_Serial_Number&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This query displays all the files that have been opened from a USB stick. I'd like to be able to display the tags and endpoint groups of the endpoints in the fields, so that I can sort as I wish and get exactly what I'm looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if anyone has a solution I'm interested &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 21:54:33 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617531#M7420</guid>
      <dc:creator>CyrilBondenetVC</dc:creator>
      <dc:date>2024-11-13T21:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use 2 datasets in the same XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617790#M7421</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/546503293"&gt;@CyrilBondenetVC&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the &lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/Join" target="_self"&gt;Join stage&lt;/A&gt; in the XQL to look for the agent hostname between both datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = xdr_data
| filter event_type = ENUM.FILE and event_sub_type = ENUM.FILE_OPEN
| alter Drive_Type = json_extract(to_json_string(action_file_device_info),"$.storage_device_drive_type"), Filesystem = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_filesystem"), Drive_Letter = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_mount_point"), Device_Serial_Number = json_extract_scalar(to_json_string(action_file_device_info),"$.storage_device_serial_number") // Getting details about the device a file was created on
| filter drive_type = "2" // Filtering by drive type 2 which is 'Removable Media'
| join (dataset = endpoints | fields group_names as GroupNames, tags as Tags, endpoint_name as EndpointName ) as endpoints endpoints.EndpointName = agent_hostname
| fields action_file_path as File_Path, actor_effective_username as Username, Filesystem, Drive_Letter, Device_Serial_Number, agent_hostname, GroupNames, Tags&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post answers your question, please mark it as the solution.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 17:41:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617790#M7421</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-11-14T17:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use 2 datasets in the same XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617814#M7422</link>
      <description>&lt;P&gt;Thank you very much. That's exactly what I needed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to understand better, could you explain to me what this part corresponds to?&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;as endpoints endpoints.EndpointName = agent_hostname&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 18:34:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617814#M7422</guid>
      <dc:creator>CyrilBondenetVC</dc:creator>
      <dc:date>2024-11-14T18:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use 2 datasets in the same XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617819#M7423</link>
      <description>&lt;P&gt;Take a look at this, hope it helps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jmazzeo_1-1731610176674.png" style="width: 1329px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/63987i67862312901A8BC1/image-dimensions/1329x186?v=v2" width="1329" height="186" role="button" title="jmazzeo_1-1731610176674.png" alt="jmazzeo_1-1731610176674.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have more details in the linked doc in my previous post.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 18:50:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/617819#M7423</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-11-14T18:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use 2 datasets in the same XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/618729#M7427</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand better now, thank you for taking the time to answer my questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it will help a lot of people &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 11:14:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/use-2-datasets-in-the-same-xql-query/m-p/618729#M7427</guid>
      <dc:creator>CyrilBondenetVC</dc:creator>
      <dc:date>2024-11-15T11:14:57Z</dc:date>
    </item>
  </channel>
</rss>

