<?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 Error running history command twice using DeltaTable in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/error-running-history-command-twice-using-deltatable/m-p/55307#M700</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Unity Catalog on Azure with a Managed Identity connected to my Storage Account. I can read and write data without issues, and interact with data using pyspark and SQL.&lt;/P&gt;&lt;P&gt;I can display the history by running a cell with the following code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from delta.tables import DeltaTable
dt = DeltaTable.forName(spark, "CATALOG.SCHEMA.TABLE")
dt.history().display()&lt;/LI-CODE&gt;&lt;P&gt;However, if I run the same history display command but in a new cell I get a strange error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dt.history().display()&lt;/LI-CODE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Failure to initialize configuration for storage account NAME.dfs.core.windows.net: Invalid configuration value detected for fs.azure.account.keyInvalid configuration value detected for fs.azure.account.key&lt;/LI-CODE&gt;&lt;P&gt;However, I can keep running the first cell multiple times and get a result displayed, but running display in a new cell throws the error.&lt;/P&gt;&lt;P&gt;Also trying to persist the history throws an error under certain circumstances:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from delta.tables import DeltaTable
dt = DeltaTable.forName(spark, "CATALOG.SCHEMA.TABLE")&lt;/LI-CODE&gt;&lt;P&gt;Persist command in a new cell:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a = dt.history().persist()&lt;/LI-CODE&gt;&lt;P&gt;Throws:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AnalysisException: [RequestId=REQUESTID ErrorClass=INVALID_PARAMETER_VALUE.LOCATION_OVERLAP] Input path url 'abfss://CONTAINER@STORAGEACCOUNT.dfs.core.windows.net/__unitystorage/catalogs/SOMEID/tables/TABLEID' overlaps with managed storage within 'GenerateTemporaryPathCredential' call&lt;/LI-CODE&gt;&lt;P&gt;I can run the history command in SQL cell multiple times without any issues:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%sql
describe history CATALOG.SCHEMA.TABLE&lt;/LI-CODE&gt;&lt;P&gt;TLDR: Inconsistent behavior of delta.tables.DeltaTable.history command while sql describe history works&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 09:14:51 GMT</pubDate>
    <dc:creator>mathiaskvist</dc:creator>
    <dc:date>2023-12-15T09:14:51Z</dc:date>
    <item>
      <title>Error running history command twice using DeltaTable</title>
      <link>https://community.databricks.com/t5/administration-architecture/error-running-history-command-twice-using-deltatable/m-p/55307#M700</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Unity Catalog on Azure with a Managed Identity connected to my Storage Account. I can read and write data without issues, and interact with data using pyspark and SQL.&lt;/P&gt;&lt;P&gt;I can display the history by running a cell with the following code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from delta.tables import DeltaTable
dt = DeltaTable.forName(spark, "CATALOG.SCHEMA.TABLE")
dt.history().display()&lt;/LI-CODE&gt;&lt;P&gt;However, if I run the same history display command but in a new cell I get a strange error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dt.history().display()&lt;/LI-CODE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Failure to initialize configuration for storage account NAME.dfs.core.windows.net: Invalid configuration value detected for fs.azure.account.keyInvalid configuration value detected for fs.azure.account.key&lt;/LI-CODE&gt;&lt;P&gt;However, I can keep running the first cell multiple times and get a result displayed, but running display in a new cell throws the error.&lt;/P&gt;&lt;P&gt;Also trying to persist the history throws an error under certain circumstances:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from delta.tables import DeltaTable
dt = DeltaTable.forName(spark, "CATALOG.SCHEMA.TABLE")&lt;/LI-CODE&gt;&lt;P&gt;Persist command in a new cell:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a = dt.history().persist()&lt;/LI-CODE&gt;&lt;P&gt;Throws:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AnalysisException: [RequestId=REQUESTID ErrorClass=INVALID_PARAMETER_VALUE.LOCATION_OVERLAP] Input path url 'abfss://CONTAINER@STORAGEACCOUNT.dfs.core.windows.net/__unitystorage/catalogs/SOMEID/tables/TABLEID' overlaps with managed storage within 'GenerateTemporaryPathCredential' call&lt;/LI-CODE&gt;&lt;P&gt;I can run the history command in SQL cell multiple times without any issues:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%sql
describe history CATALOG.SCHEMA.TABLE&lt;/LI-CODE&gt;&lt;P&gt;TLDR: Inconsistent behavior of delta.tables.DeltaTable.history command while sql describe history works&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 09:14:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/error-running-history-command-twice-using-deltatable/m-p/55307#M700</guid>
      <dc:creator>mathiaskvist</dc:creator>
      <dc:date>2023-12-15T09:14:51Z</dc:date>
    </item>
  </channel>
</rss>

