<?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 can I run a streaming query on a new table with tbl property: change data feed enabled? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18369#M12178</link>
    <description>&lt;P&gt;Hi @daniel e​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try running the select command on table changes from 0th version and see if you get output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SELECT&lt;/B&gt; * &lt;B&gt;FROM&lt;/B&gt; table_changes('tableName', 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Please share the streaming query that you are running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 20:03:40 GMT</pubDate>
    <dc:creator>swethaNandan</dc:creator>
    <dc:date>2023-01-30T20:03:40Z</dc:date>
    <item>
      <title>How can I run a streaming query on a new table with tbl property: change data feed enabled?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18367#M12176</link>
      <description>&lt;P&gt;In Databricks on AWS, I am trying to run a streaming query (trigger=Once) with delta.enableChangeDataFeed=true in the table definition as instructed, but this always fails with :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ERROR: Some streams terminated before this command could finish!
&amp;nbsp;
com.databricks.sql.transaction.tahoe.DeltaAnalysisException: Error getting change data for range [0 , 0] as change data was not recorded for version [0]. If you\'ve enabled change data feed on this table, use `DESCRIBE HISTORY` to see when it was first enabled.
Otherwise, to start recording change data, use `ALTER TABLE table_name SET TBLPROPERTIES
(delta.enableChangeDataFeed=true)`.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;removing checkpoints for streaming query&lt;/LI&gt;&lt;LI&gt;recreating the table&lt;/LI&gt;&lt;LI&gt;adding "spark.databricks.delta.properties.defaults.enableChangeDataFeed": "true" to spark_conf of the compute&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;None of those fixed the issue. This is quite puzzling as this setting works for other tables.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 11:35:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18367#M12176</guid>
      <dc:creator>nimble</dc:creator>
      <dc:date>2022-12-06T11:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a streaming query on a new table with tbl property: change data feed enabled?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18368#M12177</link>
      <description>&lt;P&gt;What is precisely recreating a table? Maybe delta files are in the old version, which is not supporting CDC. Please also share your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please first just read CDC not as a stream but as SELECT * FROM table_changes(table)&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 14:44:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18368#M12177</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-12-06T14:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a streaming query on a new table with tbl property: change data feed enabled?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18369#M12178</link>
      <description>&lt;P&gt;Hi @daniel e​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try running the select command on table changes from 0th version and see if you get output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SELECT&lt;/B&gt; * &lt;B&gt;FROM&lt;/B&gt; table_changes('tableName', 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Please share the streaming query that you are running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 20:03:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-streaming-query-on-a-new-table-with-tbl-property/m-p/18369#M12178</guid>
      <dc:creator>swethaNandan</dc:creator>
      <dc:date>2023-01-30T20:03:40Z</dc:date>
    </item>
  </channel>
</rss>

