Can I see whether a table column is read in databricks?

dpc
Contributor III

Hello

Historically, we had a number of tables that have been extracted from source and loaded to databricks using 'select *'.

As a result some columns that have been loaded never get used.

I'd like to tidy this and remove redundant columns.

 

Is there a way I can script whether columns in a table are referenced (or preferably not) in any downstream databricks notebooks?

 

Thanks