Skip to main content

tables

Creates, updates, deletes, gets or lists a tables resource.

Overview

Nametables
TypeResource
Iddatabricks_workspace.unitycatalog.tables

Fields

The following fields are returned by SELECT queries:

The tables list was successfully retrieved.

NameDatatypeDescription
namestring
data_access_configuration_idstring
metastore_idstring
pipeline_idstring
table_idstring
catalog_namestring
full_namestring
schema_namestring
storage_credential_namestring
access_pointstring
browse_onlyboolean
columnsarray
commentstring
created_atinteger
created_bystring
data_source_formatstring
deleted_atinteger
delta_runtime_properties_kvpairsobject
effective_predictive_optimization_flagobject
enable_predictive_optimizationstring
ownerstring
propertiesobject
row_filterobject
sql_pathstring
storage_locationstring
table_constraintsarray
table_typestring
updated_atinteger
updated_bystring
view_definitionstring
view_dependenciesobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_nameGets an array of all tables for the current metastore under the parent catalog and schema. The caller must be a metastore admin or an owner of (or have the
getselectdeployment_nameGets a table from the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements:
deletedeletedeployment_nameDeletes a table from the specified parent catalog and schema. The caller must be the owner of the parent catalog, have the

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets an array of all tables for the current metastore under the parent catalog and schema. The caller must be a metastore admin or an owner of (or have the

SELECT
name,
data_access_configuration_id,
metastore_id,
pipeline_id,
table_id,
catalog_name,
full_name,
schema_name,
storage_credential_name,
access_point,
browse_only,
columns,
comment,
created_at,
created_by,
data_source_format,
deleted_at,
delta_runtime_properties_kvpairs,
effective_predictive_optimization_flag,
enable_predictive_optimization,
owner,
properties,
row_filter,
sql_path,
storage_location,
table_constraints,
table_type,
updated_at,
updated_by,
view_definition,
view_dependencies
FROM databricks_workspace.unitycatalog.tables
WHERE deployment_name = '{{ deployment_name }}' -- required;

DELETE examples

Deletes a table from the specified parent catalog and schema. The caller must be the owner of the parent catalog, have the

DELETE FROM databricks_workspace.unitycatalog.tables
WHERE deployment_name = '{{ deployment_name }}' --required;