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.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now