<?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: Delta Live Table - Cannot redefine dataset in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/151695#M53685</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp;there is no such "delete_table" API, see reference:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/ldp/developer/python-ref#api-reference" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/ldp/developer/python-ref#api-reference&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2026 10:21:09 GMT</pubDate>
    <dc:creator>Malthe</dc:creator>
    <dc:date>2026-03-23T10:21:09Z</dc:date>
    <item>
      <title>Delta Live Table - Cannot redefine dataset</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64398#M32561</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to Delta Live Table.&lt;/P&gt;&lt;P&gt;I am trying to create a delta live table from the databricks tutorial.&lt;/P&gt;&lt;P&gt;I have created a notebook and attached an interactive cluster -DBR 14.3-LTS.&lt;/P&gt;&lt;P&gt;I am running the below code.&lt;/P&gt;&lt;P&gt;When I ran it for the 1st time it ran successfully.&lt;/P&gt;&lt;P&gt;When I ran the cell for the 2nd time I am getting error -&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;AnalysisException: &lt;/SPAN&gt;Cannot redefine dataset 'sales_orders_raw'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can you please help me understand why this is happening?&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; pyspark.sql.functions &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; *&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; pyspark.sql.types &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; *&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; dlt&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;&lt;/SPAN&gt;&lt;SPAN&gt;.create_table(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; comment=&lt;/SPAN&gt;&lt;SPAN&gt;"The raw sales orders, ingested from /databricks-datasets."&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; table_properties={&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"myCompanyPipeline.quality"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"bronze"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"pipelines.autoOptimize.managed"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt;&lt;SPAN&gt; sales_orders_raw():&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; spark.readStream.&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles"&lt;/SPAN&gt;&lt;SPAN&gt;) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .option(&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles.schemaLocation"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"/tmp/john.odwyer/pythonsalestest"&lt;/SPAN&gt;&lt;SPAN&gt;) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .option(&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles.format"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"json"&lt;/SPAN&gt;&lt;SPAN&gt;) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .option(&lt;/SPAN&gt;&lt;SPAN&gt;"cloudFiles.inferColumnTypes"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;) \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .load(&lt;/SPAN&gt;&lt;SPAN&gt;"/databricks-datasets/retail-org/sales_orders/"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;----------------------------------------------------------------&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 13:28:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64398#M32561</guid>
      <dc:creator>monojmckvie</dc:creator>
      <dc:date>2024-03-22T13:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table - Cannot redefine dataset</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64443#M32573</link>
      <description>&lt;P class="_1t7bu9h1 paragraph"&gt;The error message "AnalysisException: Cannot redefine dataset 'sales_orders_raw'" is indicating that you're trying to create a table that already exists. In Databricks, once a Delta Live Table (DLT) is defined, it cannot be redefined or overwritten. This is to ensure the consistency and reliability of your data pipelines.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to modify the table definition, you will need to delete the existing table first. However, be aware that this will also delete all the data in the table. If you want to keep the data, you should create a new table with a different name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="_1sijkvt3"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;Here's how you can delete a DLT:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="_1t7bu9hb markdown-code-python hljs language-python" data-highlighted="yes"&gt;&lt;SPAN class="hljs-meta"&gt;@dlt.delete_table&lt;/SPAN&gt;
&lt;SPAN class="hljs-keyword"&gt;def&lt;/SPAN&gt; &lt;SPAN class="hljs-title function_"&gt;sales_orders_raw&lt;/SPAN&gt;():
  &lt;SPAN class="hljs-keyword"&gt;pass&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;After running this, you should be able to redefine your &lt;CODE&gt;sales_orders_raw&lt;/CODE&gt; table.&lt;/P&gt;
&lt;P class="_1t7bu9h1 paragraph"&gt;Remember to be careful when deleting tables, especially in a production environment, as this action cannot be undone.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2024 14:55:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64443#M32573</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-03-23T14:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table - Cannot redefine dataset</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64494#M32587</link>
      <description>&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;But while I am executing delete_table command I am getting error -&amp;nbsp;&lt;STRONG&gt;module 'dlt' has no attribute 'delete_table'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My cluster config -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="monojmckvie_0-1711349958291.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6769i8015C45CCDC420A3/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="monojmckvie_0-1711349958291.png" alt="monojmckvie_0-1711349958291.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you can suggest please.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 06:59:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/64494#M32587</guid>
      <dc:creator>monojmckvie</dc:creator>
      <dc:date>2024-03-25T06:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delta Live Table - Cannot redefine dataset</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/151695#M53685</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp;there is no such "delete_table" API, see reference:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/ldp/developer/python-ref#api-reference" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/ldp/developer/python-ref#api-reference&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 10:21:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-table-cannot-redefine-dataset/m-p/151695#M53685</guid>
      <dc:creator>Malthe</dc:creator>
      <dc:date>2026-03-23T10:21:09Z</dc:date>
    </item>
  </channel>
</rss>

