Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above Unity Catalog only
The INFORMATION_SCHEMA is a SQL standard based schema, provided in every catalog created on Unity Catalog.
Within the information schema, you can find a set of views describing the objects known to the schema’s catalog that you are privileged to see.
The information schema of the SYSTEM catalog returns information about objects across all catalogs within the metastore. Information schema system tables do not contain metadata about hive_metastore objects.
The purpose of the information schema is to provide a SQL based, self describing API to the metadata.
Entity relationship diagram of the information schema
The following entity relationship (ER) diagram provides an overview of a subset of information schema views and how they relate to each other.
Contains volume tagging metadata applied to a volume.
Notes
While identifiers are case-insensitive when referenced in SQL statements, they are stored in the information schema as STRING.
This implies that you must either search for them using the case in which the identifier is stored, or use functions such as ilike.
Examples
SQL
> SELECT table_name, column_name
FROM information_schema.columns
WHERE data_type = 'DOUBLE'AND table_schema = 'information_schema';
The following are examples of workflows that use the system level information schema tables.
If you want to view all tables that have been created in the last 24 hours, your query could look like the following.
Relational databases can store vast quantities of data, but they also need to hold information about the structure of that data. For an operational database management system (DBMS) information about the structure of tables, and all other objects, security, and concurrency, amongst many other settings and metrics, is required. This information is know as metadata and is stored in system catalogs in Azure Database for PostgreSQL. In addition to directly accessing system catalogs, you can access system views