Skip to main content

table_exists

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

Overview

Nametable_exists
TypeResource
Iddatabricks_workspace.unitycatalog.table_exists

Fields

The following fields are returned by SELECT queries:

The boolean reflecting if the table exists was successfully returned.

NameDatatypeDescription
table_existsboolean

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
existsselectdeployment_nameGets if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements:

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 if a table exists in the metastore for a specific catalog and schema. The caller must satisfy one of the following requirements:

SELECT
table_exists
FROM databricks_workspace.unitycatalog.table_exists
WHERE deployment_name = '{{ deployment_name }}' -- required;