<?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: I have several thousands of Delta tables in my Production, what is the best way to get counts in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21777#M14888</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;val db = "database_name"
spark.sessionState.catalog.listTables(db).map(table=&amp;gt;spark.sessionState.catalog.externalCatalog.getTable(table.database.get,table.table)).filter(x=&amp;gt;x.provider.toString().toLowerCase.contains("delta"))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code snippet will give the name of all the Delta tables in a database. If the intention is to create a dashboard, then &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;iterate over all the databases &lt;/LI&gt;&lt;LI&gt; identify the Delta tables &lt;/LI&gt;&lt;LI&gt;Call the "DESCRIBE HISTORY" command on each of the delta tables &lt;/LI&gt;&lt;LI&gt;The details of all the tables and row count can be stored in a Delta table. &lt;/LI&gt;&lt;LI&gt;Dashboard can query the delta table used to store these details in #4 &lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Tue, 22 Jun 2021 22:53:13 GMT</pubDate>
    <dc:creator>brickster_2018</dc:creator>
    <dc:date>2021-06-22T22:53:13Z</dc:date>
    <item>
      <title>I have several thousands of Delta tables in my Production, what is the best way to get counts</title>
      <link>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21775#M14886</link>
      <description>&lt;P&gt;if I might need a dashboard to see increase in number of rows on day to day basis, also a dashboard that shows size of Parquet/Delta files in my Lake?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 14:56:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21775#M14886</guid>
      <dc:creator>Srikanth_Gupta_</dc:creator>
      <dc:date>2021-06-22T14:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: I have several thousands of Delta tables in my Production, what is the best way to get counts</title>
      <link>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21776#M14887</link>
      <description>&lt;P&gt;The&amp;nbsp; history operation on a delta table returns a collection of operations metrics which includes number of rows and files added/removed between different operations. You could use this in our sql-endpoint workspace and build a dashboard that displays the desired info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DESCRIBE HISTORY delta.`/data/events/`&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 15:21:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21776#M14887</guid>
      <dc:creator>sajith_appukutt</dc:creator>
      <dc:date>2021-06-22T15:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: I have several thousands of Delta tables in my Production, what is the best way to get counts</title>
      <link>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21777#M14888</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;val db = "database_name"
spark.sessionState.catalog.listTables(db).map(table=&amp;gt;spark.sessionState.catalog.externalCatalog.getTable(table.database.get,table.table)).filter(x=&amp;gt;x.provider.toString().toLowerCase.contains("delta"))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code snippet will give the name of all the Delta tables in a database. If the intention is to create a dashboard, then &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;iterate over all the databases &lt;/LI&gt;&lt;LI&gt; identify the Delta tables &lt;/LI&gt;&lt;LI&gt;Call the "DESCRIBE HISTORY" command on each of the delta tables &lt;/LI&gt;&lt;LI&gt;The details of all the tables and row count can be stored in a Delta table. &lt;/LI&gt;&lt;LI&gt;Dashboard can query the delta table used to store these details in #4 &lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 22 Jun 2021 22:53:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-have-several-thousands-of-delta-tables-in-my-production-what/m-p/21777#M14888</guid>
      <dc:creator>brickster_2018</dc:creator>
      <dc:date>2021-06-22T22:53:13Z</dc:date>
    </item>
  </channel>
</rss>

