POST_START

Discovering Catalog Metadata with INFORMATION_SCHEMA

I recently started working with Databricks Unity Catalog, and I wanted to get a better understanding of the metadata available in the environment. One of the first things I needed to do was find out what catalogs exist within the Databricks workspace. I remembered that Unity Catalog provides a way to query metadata through the INFORMATION_SCHEMA, so I decided to explore that.

Listing All Catalogs

I ran the following SQL query to retrieve all catalogs and their owners:

SELECT * FROM system.information_schema.catalogs;
catalog_name catalog_owner
production data_platform_admins
training instructors

From the output, I could see that there are two catalogs: production and training. The production catalog is owned by the data_platform_admins group, while the training catalog is owned by the instructors group. This helped me understand who has access to which catalogs and how they are organized.

Sorting Catalogs by Name

To make it easier to browse the catalogs, I decided to sort them by name. I ran the following query:

SELECT catalog_name FROM system.information_schema.catalogs ORDER BY catalog_name;
catalog_name catalog_owner
production data_platform_admins
training instructors

Even though I only selected the catalog_name, the output still included the catalog_owner column, which is helpful for quickly identifying who owns each catalog. This made it easier to navigate the metadata and understand the ownership structure of the catalogs in the workspace.

By using the INFORMATION_SCHEMA, I was able to quickly get a clear picture of the catalogs available and their owners. This is a great starting point for exploring Unity Catalog metadata and understanding how data is organized within the Databricks environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies and similar technologies to enhance your experience on wobizdu.com, analyze site traffic, personalize content, and deliver relevant ads. Some cookies are essential for the site to function, while others help us improve performance and user experience. You may accept all cookies, decline optional ones, or customize your settings. Review our Privacy Policy to learn more.