<?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 Query to show column names in common between multiple tables in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112188#M44130</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large amount of tables that I would like a query to pull the column names present in these tables that are common between all the tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know about show columns, but can't seem to use this or another method to achieve this. This will save me from having to manually check large amounts of tables to see what columns are in common.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 17:54:25 GMT</pubDate>
    <dc:creator>Datanoob123</dc:creator>
    <dc:date>2025-03-10T17:54:25Z</dc:date>
    <item>
      <title>Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112188#M44130</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large amount of tables that I would like a query to pull the column names present in these tables that are common between all the tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know about show columns, but can't seem to use this or another method to achieve this. This will save me from having to manually check large amounts of tables to see what columns are in common.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 17:54:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112188#M44130</guid>
      <dc:creator>Datanoob123</dc:creator>
      <dc:date>2025-03-10T17:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112193#M44133</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/152832"&gt;@Datanoob123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You find all the column names in the system tables of Unity Catalog in the following table:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;system.information_schema.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;columns&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StefanKoch_0-1741635093929.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/15323iAF8109FB15467A47/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StefanKoch_0-1741635093929.png" alt="StefanKoch_0-1741635093929.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Mar 2025 19:31:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112193#M44133</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2025-03-10T19:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112194#M44134</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/152832"&gt;@Datanoob123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can use information_schema in system tables to get the details about columns and tables in Databricks. Here is a sample code that gives you the column names and number of tables with same column name.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT column_name, COUNT(DISTINCT table_name) AS table_count
FROM information_schema.columns
GROUP BY column_name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 19:34:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112194#M44134</guid>
      <dc:creator>KaranamS</dc:creator>
      <dc:date>2025-03-10T19:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112286#M44164</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I think maybe that view is not available, I get this error:&amp;nbsp;&lt;SPAN&gt;AnalysisException: Table or view not found: information_schema.columns; line 2 pos 5;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 14:29:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112286#M44164</guid>
      <dc:creator>Datanoob123</dc:creator>
      <dc:date>2025-03-11T14:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112287#M44165</link>
      <description>&lt;P&gt;I get this error,&amp;nbsp;&lt;SPAN&gt;Error in SQL statement: AnalysisException: Catalog namespace is not supported.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 14:30:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112287#M44165</guid>
      <dc:creator>Datanoob123</dc:creator>
      <dc:date>2025-03-11T14:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112289#M44167</link>
      <description>&lt;P&gt;could be, system tables are not enabled, or you don't have access to it. Are you a member of the admin group? or can you ask your administrator?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 14:40:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112289#M44167</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2025-03-11T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show column names in common between multiple tables</title>
      <link>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112311#M44173</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/152832"&gt;@Datanoob123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/107693"&gt;@Stefan-Koch&lt;/a&gt;! It could be that you don't have access to the system tables. Please reach out to your Databricks Admin to grant you required permissions to system tables. You can then use the query I shared to get the required results&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 21:43:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/query-to-show-column-names-in-common-between-multiple-tables/m-p/112311#M44173</guid>
      <dc:creator>KaranamS</dc:creator>
      <dc:date>2025-03-11T21:43:03Z</dc:date>
    </item>
  </channel>
</rss>

