TABLES view | Snowflake Documentation (original) (raw)
TABLE_ID
NUMBER
Internal, Snowflake-generated identifier for the table.
TABLE_NAME
VARCHAR
Name of the table.
TABLE_SCHEMA_ID
NUMBER
Internal, Snowflake-generated identifier of the schema for the table.
TABLE_SCHEMA
VARCHAR
Schema that the table belongs to.
TABLE_CATALOG_ID
NUMBER
Internal, Snowflake-generated identifier of the database for the table.
TABLE_CATALOG
VARCHAR
Database that the table belongs to.
TABLE_OWNER
VARCHAR
Name of the role that owns the table.
TABLE_TYPE
VARCHAR
Indicates the table type. Valid values are BASE TABLE, TEMPORARY TABLE, EXTERNAL TABLE, EVENT TABLE, VIEW, or MATERIALIZED VIEW.
IS_TRANSIENT
VARCHAR
Indicates whether the table is transient.
CLUSTERING_KEY
VARCHAR
Column(s) and/or expression(s) that comprise the clustering key for the table.
ROW_COUNT
NUMBER
Number of rows in the table.
BYTES
NUMBER
Number of bytes accessed by a scan of the table.
RETENTION_TIME
NUMBER
Number of days that historical data is retained for Time Travel.
SELF_REFERENCING_COLUMN_NAME
VARCHAR
Not applicable for Snowflake.
REFERENCE_GENERATION
VARCHAR
Not applicable for Snowflake.
USER_DEFINED_TYPE_CATALOG
VARCHAR
Not applicable for Snowflake.
USER_DEFINED_TYPE_SCHEMA
VARCHAR
Not applicable for Snowflake.
USER_DEFINED_TYPE_NAME
VARCHAR
Not applicable for Snowflake.
IS_INSERTABLE_INTO
VARCHAR
Not applicable for Snowflake.
IS_TYPED
VARCHAR
Not applicable for Snowflake.
COMMIT_ACTION
VARCHAR
Not applicable for Snowflake.
CREATED
TIMESTAMP_LTZ
Date and time when the table was created.
LAST_ALTERED
TIMESTAMP_LTZ
Date and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes.
LAST_DDL
TIMESTAMP_LTZ
Timestamp of the last DDL operation performed on the table or view.
All supported table/view DDL operations update this field:
- { CREATE | ALTER | DROP | UNDROP } TABLE
- { CREATE | ALTER | DROP } VIEW
All ALTER TABLE operations update this field, including setting or unsetting a table parameter (for example, COMMENT, DATA_RETENTION_TIME, etc.) and changes to table columns (ADD / MODIFY / RENAME / DROP).
For more information, see the Usage Notes.
LAST_DDL_BY
VARCHAR
The current username for the user who executed the last DDL operation. If the user has been dropped, showsDROPPED_USER(<id>).
For dropped users, you can join the <id> with the USER_ID column in the USERS view of the ACCOUNT_USAGE or ORGANIZATION_USAGE schema.
DELETED
TIMESTAMP_LTZ
Date and time when the table was dropped.
AUTO_CLUSTERING_ON
VARCHAR
Status of Automatic Clustering for a table. For details, see Viewing the Automatic Clustering status for a table.
COMMENT
VARCHAR
Comment for the table.
OWNER_ROLE_TYPE
VARCHAR
The type of role that owns the object, for example ROLE. . If a Snowflake Native App owns the object, the value is APPLICATION. . Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.
INSTANCE_ID
NUMBER
Internal/system-generated identifier for the instance which the object belongs to.
IS_ICEBERG
VARCHAR
Indicates whether the table is an Iceberg table. Valid values are YES or NO.
IS_DYNAMIC
VARCHAR
Indicates whether the table is a dynamic table. Valid values are YES or NO.
IS_HYBRID
VARCHAR
Indicates whether the table is a hybrid table. Valid values are YES or NO.
ARCHIVE_STORAGE_COOL_ROW_COUNT
NUMBER
The number of rows that are in the COOL storage tier.
ARCHIVE_STORAGE_COOL_BYTES
NUMBER
The number of bytes accessed by retrieving data from the COOL storage tier.
ARCHIVE_STORAGE_COLD_ROW_COUNT
NUMBER
The number of rows that are in the COLD storage tier.
ARCHIVE_STORAGE_COLD_BYTES
NUMBER
The number of bytes accessed by retrieving data from the COLD storage tier.