<?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 get catalog and schema from system query table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91105#M38085</link>
    <description>&lt;P&gt;Ok thank you. I appreciate the help. It does not seem currently possible to get all of the data I need.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 18:26:11 GMT</pubDate>
    <dc:creator>jen-metaplane</dc:creator>
    <dc:date>2024-09-19T18:26:11Z</dc:date>
    <item>
      <title>How to get catalog and schema from system query table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91090#M38079</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are querying the system.query table to parse query history. If the table in the query is not fully qualified with its catalog and schema, how can we derive the catalog and schema?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 15:51:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91090#M38079</guid>
      <dc:creator>jen-metaplane</dc:creator>
      <dc:date>2024-09-19T15:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get catalog and schema from system query table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91101#M38082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/121852"&gt;@jen-metaplane&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if the table in the query is not fully qualified, then the system resolves it using the default calatog and schema.&lt;/P&gt;&lt;P&gt;You need to identify what were the default catalog and schema during query execution.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 17:54:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91101#M38082</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-09-19T17:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get catalog and schema from system query table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91102#M38083</link>
      <description>&lt;P&gt;Thanks for the response. Do you know if there is a way to do that programmatically? Either through an API or a system table?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 17:59:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91102#M38083</guid>
      <dc:creator>jen-metaplane</dc:creator>
      <dc:date>2024-09-19T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get catalog and schema from system query table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91104#M38084</link>
      <description>&lt;P&gt;There is no straightforward method to get this data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Run the query to check the defaults:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;SELECT
  current_catalog() AS default_catalog,
  current_schema() AS default_schema;&lt;/LI-CODE&gt;&lt;P&gt;Catalog and schema may be changed in the query, so if you have query text you need to search whether "USE CATALOG" or "USE" were used. If no "USE" is in the text, you may assume that the defaults were used.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_0-1726769048872.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11356i4E843A913F4D4A1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_0-1726769048872.png" alt="filipniziol_0-1726769048872.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:08:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91104#M38084</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-09-19T18:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get catalog and schema from system query table</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91105#M38085</link>
      <description>&lt;P&gt;Ok thank you. I appreciate the help. It does not seem currently possible to get all of the data I need.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:26:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-get-catalog-and-schema-from-system-query-table/m-p/91105#M38085</guid>
      <dc:creator>jen-metaplane</dc:creator>
      <dc:date>2024-09-19T18:26:11Z</dc:date>
    </item>
  </channel>
</rss>

