Information Schema (Instance Level)

The instance-level Information Schema stores metadata for the entire instance, including object information across all workspaces, user permissions, and billing usage. Access it via sys.information_schema.<view_name>.

-- Example: list all workspaces in the instance SELECT workspace_name, create_time FROM sys.information_schema.workspaces; -- Example: list all schemas across workspaces SELECT catalog_name, schema_name, type FROM sys.information_schema.schemas;

WORKSPACES

Records information about all workspaces in the instance.

ColumnTypeDescription
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
workspace_creatorSTRINGCreator account name
workspace_creator_idBIGINTCreator account ID
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation

SCHEMAS

Records schema information across all workspaces in the instance.

ColumnTypeDescription
catalog_nameSTRINGName of the workspace the schema belongs to
schema_idBIGINTSchema ID
schema_nameSTRINGSchema name
typeSTRINGSchema type, e.g. MANAGED, SHARED, EXTERNAL
schema_creatorSTRINGCreator account name
schema_creator_idBIGINTCreator account ID
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation

TABLES

Records table information across all workspaces in the instance.

ColumnTypeDescription
table_catalogSTRINGName of the workspace the table belongs to
table_catalog_idBIGINTWorkspace ID
table_schemaSTRINGSchema name
table_schema_idBIGINTSchema ID
table_nameSTRINGTable name
table_idBIGINTTable ID
table_creatorSTRINGCreator account name
table_creator_idBIGINTCreator account ID
table_typeSTRINGTable type, e.g. MANAGED_TABLE, DYNAMIC_TABLE, MATERIALIZED_VIEW, VIRTUAL_VIEW, SEMANTIC_VIEW, EXTERNAL_TABLE
row_countBIGINTRow count (NULL for views)
bytesBIGINTData size in bytes (NULL for views)
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)
is_partitionedBOOLEANWhether the table is partitioned
is_clusteredBOOLEANWhether the table is clustered
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation
data_lifecycleINTData lifecycle in days; NULL means not set

COLUMNS

Records column information for all tables in the instance.

ColumnTypeDescription
table_catalogSTRINGName of the workspace the table belongs to
table_catalog_idBIGINTWorkspace ID
table_schemaSTRINGSchema name
table_schema_idBIGINTSchema ID
table_nameSTRINGTable name
table_idBIGINTTable ID
column_nameSTRINGColumn name
column_idINTColumn ID
column_defaultBOOLEANDefault value
is_nullableBOOLEAN NOT NULLWhether NULL is allowed
data_typeSTRINGColumn data type
commentSTRINGColumn comment
is_primary_keyBOOLEAN NOT NULLWhether the column is a primary key
is_clustering_columnBOOLEAN NOT NULLWhether the column is a clustering column
create_timeTIMESTAMP_LTZCreation time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)

VIEWS

Records information about all views (regular views) in the instance.

ColumnTypeDescription
table_catalogSTRINGName of the workspace the view belongs to
table_catalog_idBIGINTWorkspace ID
table_schemaSTRINGSchema name
table_schema_idBIGINTSchema ID
table_nameSTRINGView name
table_idBIGINTView ID
table_creatorSTRINGCreator account name
table_creator_idBIGINTCreator account ID
view_definitionSTRINGSQL definition used to create the view
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)
commentSTRINGComment

USERS

Records user information across all workspaces in the instance.

ColumnTypeDescription
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
user_idBIGINTUser ID
user_nameSTRINGUser account name
role_namesSTRINGRoles assigned to the user, multiple roles separated by commas
create_timeTIMESTAMP_LTZTime the user joined the workspace
emailSTRINGUser email
telphoneSTRINGUser phone number
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation
delete_timeTIMESTAMP_LTZRemoval time (NULL if not removed)

ROLES

Records role information across all workspaces in the instance.

ColumnTypeDescription
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
role_nameSTRINGRole name
role_idBIGINTRole ID
user_namesSTRINGNames of users granted this role, multiple users separated by commas
user_idsSTRINGIDs of users granted this role, multiple IDs separated by commas
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)

CONNECTIONS

Records connection object information across all workspaces in the instance.

ColumnTypeDescription
workspace_nameSTRINGWorkspace name
workspace_idBIGINTWorkspace ID
connection_nameSTRINGConnection name
connection_idBIGINTConnection ID
connection_kindSTRINGConnection kind, e.g. STORAGE_CONNECTION, STORAGE, CATALOG, API
typeSTRINGData source type, e.g. FILE_SYSTEM, CLOUD_FUNCTION, OSS, KAFKA, MESSAGE_QUEUE, DATABRICKS_UNITY_CATALOG
providerSTRINGCloud provider, e.g. OSS, COS, S3, aliyun, tencent
regionSTRINGConnection region, e.g. cn-shanghai, ap-beijing
source_creatorSTRINGCreator account name
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation

VOLUMES

Records Volume information across all workspaces in the instance.

ColumnTypeDescription
volume_catalogSTRINGName of the workspace the volume belongs to
volume_catalog_idBIGINTWorkspace ID
volume_schemaSTRINGSchema name
volume_schema_idBIGINTSchema ID
volume_nameSTRINGVolume name
volume_idBIGINTVolume ID
volume_urlSTRINGMount path (empty for internal volumes)
volume_regionSTRINGRegion where the volume resides
volume_typeSTRINGVolume type: MANAGED (internal) or EXTERNAL
volume_creatorSTRINGCreator account name
connection_nameSTRINGReferenced connection name (empty for internal volumes)
connection_idBIGINTReferenced connection ID
commentSTRINGComment
propertiesMAP<STRING,STRING>Properties set at creation
create_timeTIMESTAMP_LTZCreation time
last_modify_timeTIMESTAMP_LTZLast modification time
delete_timeTIMESTAMP_LTZDeletion time (NULL if not deleted)

JOB_HISTORY

Records the execution history of all jobs in the instance.

ColumnTypeDescription
workspace_nameSTRINGWorkspace where the job ran
workspace_idBIGINTWorkspace ID
job_idSTRINGJob ID
job_nameSTRINGJob name
job_creatorSTRINGAccount name of the user who submitted the job
job_creator_idBIGINTUser ID of the submitter
statusSTRINGJob status, e.g. SUCCEED, FAILED, CANCELLED
cruDOUBLECompute resources consumed (CRU·hours)
error_messageSTRINGError message if the job failed
job_typeSTRINGJob type, e.g. SQL_JOB, COMPACTION_JOB
job_sub_typeSTRINGJob sub-type
job_textSTRINGSQL text that was executed
start_timeTIMESTAMP_LTZStart time
end_timeTIMESTAMP_LTZEnd time
execution_timeDOUBLEExecution duration in seconds (millisecond precision)
input_bytesBIGINTActual scanned data volume in bytes
output_bytesBIGINTOutput data volume in bytes
input_objectsSTRINGInput object names
output_objectsSTRINGOutput object names
input_tablesSTRINGInput table names
output_tablesSTRINGOutput table names
cache_hitBIGINTData read from cache in bytes
rows_producedBIGINTTotal rows processed
rows_insertedBIGINTRows inserted
rows_updatedBIGINTRows updated
rows_deletedBIGINTRows deleted
virtual_clusterSTRINGName of the virtual cluster used
virtual_cluster_idBIGINTID of the virtual cluster used
job_configSTRINGParameters set when the job was submitted
job_prioritySTRING NOT NULLJob priority
query_tagSTRINGQuery tag set by the user
client_infoSTRINGClient information (from JDBC, CLI, web, etc.)
pt_dateSTRINGPartition date for filtering by day

MATERIALIZED_VIEW_REFRESH_HISTORY

Records the refresh history of materialized views.

ColumnTypeDescription
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
schema_idBIGINTSchema ID
schema_nameSTRINGSchema name
materialized_view_idBIGINTMaterialized view ID
materialized_view_nameSTRINGMaterialized view name
cruDOUBLECompute resources consumed by the refresh (CRU·hours)
virtual_cluster_idBIGINTVirtual cluster ID used
virtual_cluster_nameSTRINGVirtual cluster name used
statusSTRINGRefresh status, e.g. SUCCEED, FAILED
scheduled_start_timeTIMESTAMP_LTZScheduled refresh time
start_timeTIMESTAMP_LTZActual start time
end_timeTIMESTAMP_LTZEnd time
error_codeSTRINGError code
error_messageSTRINGError message if the refresh failed
pt_dateDATEPartition date for filtering by day

AUTOMV_REFRESH_HISTORY

Records the refresh history of Auto Materialized Views.

ColumnTypeDescription
workspace_nameSTRINGWorkspace name
schema_nameSTRINGSchema name
materialized_view_nameSTRINGMaterialized view name
cruDOUBLECompute resources consumed by the refresh (CRU·hours)
statusSTRINGPROCESSING, SUCCEEDED, FAILED, CANCELLED
mv_process_typeSTRING NOT NULLBUILD (initial build) or REFRESH (incremental refresh)
start_timeTIMESTAMP_LTZStart time
end_timeTIMESTAMP_LTZEnd time
build_from_workspaceSTRINGWorkspace name of the source tables
build_from_workspace_idBIGINTWorkspace ID of the source tables
job_idSTRINGCorresponding job ID
error_messageSTRINGError message if the refresh failed
pt_dateSTRINGPartition date for filtering by day

OBJECT_PRIVILEGES

Records privilege grant information for all objects in the instance.

ColumnTypeDescription
granteeSTRINGName of the grantee (user name or role name)
grantorSTRINGName of the grantor
granted_toSTRING NOT NULLGrantee type, e.g. user, role
object_catalogSTRINGWorkspace name where the object resides
object_schemaSTRINGSchema name where the object resides
object_nameSTRINGObject name
object_typeSTRINGObject type, e.g. TABLE, SCHEMA, VIRTUAL_CLUSTER, FUNCTION, INDEX
sub_object_typeSTRINGSub-object type
privilege_typeSTRINGPrivilege type, e.g. ["AT_ALL"], ["SELECT"] (JSON array format)
is_grantableBOOLEANWhether the privilege can be re-granted
authorization_timeTIMESTAMP_LTZTime the privilege was granted

INSTANCE_USAGE

Records compute resource usage and billing details for the instance, aggregated by day.

ColumnTypeDescription
account_idBIGINTAccount ID
account_nameSTRINGAccount name
instance_idBIGINTInstance ID
region_nameSTRING NOT NULLRegion where the instance resides
sku_categorySTRINGBilling category, e.g. compute, storage, network
sku_nameVARCHAR(255)Billing item name
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
measurement_startSTRINGMeasurement period start time
measurement_endSTRINGMeasurement period end time
measurements_unitVARCHAR(50)Measurement unit, e.g. yuan/GiB/day, yuan/CRU/hour
measurements_consumptionDOUBLEActual usage
price_rateDECIMAL(13,7)Unit price
amountDOUBLEBilling amount
discount_rateDOUBLE NOT NULLDiscount rate
total_after_discountDOUBLEAmount after discount

Common sku_name values include AP-type compute cluster, GP-type compute cluster, Task Scheduling, Data Integration, and Streaming Integration. measurements_consumption represents the CRU consumed in the corresponding period; amount is the original billing amount; total_after_discount is the discounted amount.

STORAGE_METERING

Records storage usage and billing details for the instance. The column structure is the same as INSTANCE_USAGE and is dedicated to querying storage billing items.

ColumnTypeDescription
account_idBIGINTAccount ID
account_nameSTRINGAccount name
instance_idBIGINTInstance ID
region_nameSTRING NOT NULLRegion where the instance resides
sku_categorySTRINGBilling category
sku_nameVARCHAR(255)Billing item name
workspace_idBIGINTWorkspace ID
workspace_nameSTRINGWorkspace name
measurement_startSTRINGMeasurement period start time
measurement_endSTRINGMeasurement period end time
measurements_unitVARCHAR(50)Measurement unit
measurements_consumptionDOUBLEActual usage
price_rateDECIMAL(13,7)Unit price
amountDOUBLEBilling amount
discount_rateDOUBLE NOT NULLDiscount rate
total_after_discountDOUBLEAmount after discount

Common sku_category values include storage and network. Common sku_name values include Managed Storage Capacity, Multi-version Undeleted Storage, and Data Query Internet Data Transfer.