cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to check/list the tables which has CDF enabled?

Databrickguy
New Contributor II

How to list all the tables which has CDF enabled?

I can review a table to find out if CDF is enable with below code.

SHOW TBLPROPERTIES tableA(delta.enableChangeDataFeed)

The return

 
key                                                                    value
delta.enableChangeDataFeed                       true

Also, below code can list all the tables in databaseA

spark.catalog.listTables("databaseA")

How can I combine both to list all the tables which has delta.enableChangeDataFeed=== true?

2 REPLIES 2

Hubert-Dudek
Esteemed Contributor III

Just wrap it in Python code, add .collect() in the end of listTables and apply for each

jose_gonzalez
Databricks Employee
Databricks Employee

Hhi @Tim zhangโ€‹,

Just a friendly follow-up. Did any of the responses help you to resolve your question? if it did, please mark it as best. Otherwise, please let us know if you still need help.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group