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:ย 

Need to track the schema changes/column renames/column drops in Data bricks Unity Catalog

data_learner1
New Contributor II

Hi Team, 

We are getting data from third party vendor to the databricks unity Catalog. They are doing schema changes frequently and we would like to track that. Just wanted to know if I can do this using audit table on the system catalog. As we only have read permissions, we may not have an access but wanted to ask them to create a view for us. does wanted to understand if the audit table logs can help us in this scenario? please let us know if anyone of you has a better solution or how you are doing it. Please provide me some insights on this.

Thank you

 

4 REPLIES 4

KaranamS
Contributor III

Hi @data_learner1 ,

Audit logs focus on security and usage monitoring such as user access, table read/write events. They don't track schema level changes.

To track schema level changes, delta transaction logs will be the best to use. The transaction log files are typically stored in a _delta_log directory within the table's root directory. Here is a sample code snippet you can use to query the log files for a table.

 

df = spark.read.json("/path/to/your/delta/table/_delta_log/*.json")
df.select("commitInfo","metaData").display()

 

Hope this helps!

data_learner1
New Contributor II

@KaranamS : for suppose, i have list of tables in databricks unity catalog, with the read access I wanted to find out if they are doing any renames to the existing tables? how can we do this?

Thank you for your suggestions.

 

KaranamS
Contributor III

@data_learner1 , Other alternative to track the table renames would be snapshots. You can run 'SHOW TABLES' on a catalog and save the output on daily basis and compare current vs previous to find out dropped or renamed tables

CURIOUS_DE
Contributor III

@data_learner1 

 

Unity Catalog logs all data access and metadata operations (including schema changes) into the audit logs โ€” which are stored in the system catalog tables, such as:

system.access.audit

You mentioned you only have read access โ€” and likely no access to system.access.audit, which is only visible to metastore admins or users with elevated privileges. 

Databricks Solution Architect