TABLES
Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above Unity Catalog only
INFORMATION_SCHEMA.TABLES contains the object level meta data for tables and views (relations) within the local catalog or all catalogs if owned by the SYSTEM
catalog.
The rows returned are limited to the relations the user is privileged to interact with.
Definition
The TABLES
relation contains the following columns:
Name |
Data type |
Nullable |
Standard |
Description |
---|---|---|---|---|
|
|
No |
Yes |
Catalog that contains the relation. |
|
|
No |
Yes |
Schema that contains the relation. |
|
|
No |
Yes |
Name of the relation. |
|
|
No |
Yes |
See Table types. |
|
|
No |
Yes |
|
|
|
No |
Yes |
Always |
|
|
No |
No |
User or group (principal) currently owning the relation. |
|
|
Yes |
No |
An optional comment that describes the relation. |
|
|
No |
No |
Timestamp when the relation was created. |
|
|
No |
No |
Principal which created the relation. |
|
|
No |
No |
Timestamp when the relation definition was last altered in any way. |
|
|
No |
No |
Principal which last altered the relation. |
|
|
No |
No |
Format of the data source such as |
|
|
Yes |
No |
Discontinued. Always |
Constraints
The following constraints apply to the TABLES
relation:
Class |
Name |
Column List |
Description |
---|---|---|---|
Primary key |
|
|
Unique identifier for the relation. |
Foreign key |
|
|
References SCHEMATA. |
Table types
The TABLE_TYPE
column in the TABLES
relation can have the following values:
VIEW
: A virtual table that is defined by a query.FOREIGN
: A federated table.MANAGED
: A regular table for which the storage is managed by the catalog.STREAMING_TABLE
: A table that is used for streaming data.MATERIALIZED_VIEW
: A table that is a materialized view.EXTERNAL
: A table for which the storage is managed outside the catalog.MANAGED_SHALLOW_CLONE
: A table that is a shallow clone of a managed table.EXTERNAL_SHALLOW_CLONE
: A table that is a shallow clone of an external table.