<?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 do I get a list of the tables that I personally created? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11180#M6199</link>
    <description>&lt;P&gt;Hi @Barb Krienke​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 12:05:18 GMT</pubDate>
    <dc:creator>Vidula</dc:creator>
    <dc:date>2022-09-07T12:05:18Z</dc:date>
    <item>
      <title>How do I get a list of the tables that I personally created?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11178#M6197</link>
      <description>&lt;P&gt;I know that I can get a list of all of the table names in a given 'database' by using (if the 'database' was named "scratch"):  show tables from&amp;nbsp;scratch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get a list just like that, but that only lists the tables that I created?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 21:17:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11178#M6197</guid>
      <dc:creator>Barb</dc:creator>
      <dc:date>2022-08-04T21:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a list of the tables that I personally created?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11179#M6198</link>
      <description>&lt;P&gt;Without Unity Catalog using table history :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Call "SHOW TABLES FROM db_name" to collect all tables names&lt;/LI&gt;&lt;LI&gt;Loop on tables identifying the table creator using the next command : spark.sql('DESCRIBE HISTORY db_name.table_name').where('operation like "CREATE TABLE%"').select('userName').first()['userName']&lt;/LI&gt;&lt;LI&gt;Filter the result obtained in p.2 to obtain the target list of tables&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without Unity Catalog using owner field :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Enable table access control for a cluster (&lt;A href="https://docs.databricks.com/security/access-control/table-acls/table-acl.html?_ga=2.112357700.1131796965.1659874298-556310656.1652271816" alt="https://docs.databricks.com/security/access-control/table-acls/table-acl.html?_ga=2.112357700.1131796965.1659874298-556310656.1652271816" target="_blank"&gt;https://docs.databricks.com/security/access-control/table-acls/table-acl.html&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Set owner for each table that you need : ALTER TABLE db_name.my_table_name OWNER TO `abc@gmail.com`&lt;/LI&gt;&lt;LI&gt;Call "SHOW TABLES FROM db_name" to collect all tables names&lt;/LI&gt;&lt;LI&gt;Loop on tables identifying the table owner spark.sql('DESCRIBE EXTENDED db_name.table_name').filter('col_name = "Owner" and data_type = "abc@gmail.com"')&lt;/LI&gt;&lt;LI&gt;Filter the result obtained in p.4 to obtain the target list of tables&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Unity Catalog tables, you can use created_by or table_owner column from information_schema.tables :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT *
FROM my_unity_catalog_name.information_schema.tables
WHERE created_by LIKE '%my_username_name_part%'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 14:25:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11179#M6198</guid>
      <dc:creator>artsheiko</dc:creator>
      <dc:date>2022-08-07T14:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get a list of the tables that I personally created?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11180#M6199</link>
      <description>&lt;P&gt;Hi @Barb Krienke​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 12:05:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-get-a-list-of-the-tables-that-i-personally-created/m-p/11180#M6199</guid>
      <dc:creator>Vidula</dc:creator>
      <dc:date>2022-09-07T12:05:18Z</dc:date>
    </item>
  </channel>
</rss>

