POST_START
Inventorying Production Tables and Views Before a Governance Review
I recently had the task of inventorying the production tables and views in our Databricks environment before a governance review. This was a crucial step to ensure that all data assets were accounted for and that we had a clear understanding of what was being used in our production systems. I started by querying the system catalog to get a list of all tables and views in the ‘production’ catalog.
SELECT table_catalog, table_schema, table_name, table_type FROM system.information_schema.tables WHERE table_catalog = 'production';
| table_catalog | table_schema | table_name | table_type |
|---|---|---|---|
| production | sales | customers | MANAGED |
| production | sales | orders | MANAGED |
This query returned a list of tables and views within the ‘production’ catalog. I noticed that the results included both tables and views, which was helpful for a comprehensive inventory. The output showed that there were at least two tables in the ‘sales’ schema: ‘customers’ and ‘orders’, both of type ‘MANAGED’.
To make the results more readable and organized, I decided to sort them by schema and table name. This would help the governance team quickly locate and understand the structure of the data assets.
SELECT table_schema, table_name, table_type FROM system.information_schema.tables WHERE table_catalog = 'production' ORDER BY table_schema, table_name;
| table_catalog | table_schema | table_name | table_type |
|---|---|---|---|
| production | sales | customers | MANAGED |
| production | sales | orders | MANAGED |
The sorted query produced the same results, but now the data was neatly grouped by schema. This made it easier to see which tables belonged to which schema and helped me quickly identify any patterns or inconsistencies in the naming conventions.
With this information, I was able to provide the governance team with a clear and structured list of all tables and views in the production catalog. This step was essential for ensuring that all data assets were properly documented and that the team had a solid foundation for their review.


Leave a Reply