external-metadata command group
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The external-metadata command group within the Databricks CLI contains commands to register and manage metadata about external systems within Unity Catalog.
databricks external-metadata create-external-metadata
Create a new external metadata object in the parent metastore if the caller is a metastore admin or has the CREATE_EXTERNAL_METADATA privilege. Grants BROWSE to all account users upon creation by default.
databricks external-metadata create-external-metadata NAME SYSTEM_TYPE ENTITY_TYPE [flags]
Arguments
NAME
Name of the external metadata object.
SYSTEM_TYPE
Type of external system. Supported values: AMAZON_REDSHIFT, AZURE_SYNAPSE, CONFLUENT, DATABRICKS, GOOGLE_BIGQUERY, KAFKA, LOOKER, MICROSOFT_FABRIC, MICROSOFT_SQL_SERVER, MONGODB, MYSQL, ORACLE, OTHER, POSTGRESQL, POWER_BI, SALESFORCE, SAP, SERVICENOW, SNOWFLAKE, STREAM_NATIVE, TABLEAU, TERADATA, WORKDAY.
ENTITY_TYPE
Type of entity within the external system.
Options
--description string
User-provided free-form text description.
--json JSON
The inline JSON string or the @path to the JSON file with the request body
--owner string
Owner of the external metadata object.
--url string
URL associated with the external metadata object.
Examples
The following example creates an external metadata object for a Snowflake table:
databricks external-metadata create-external-metadata my_snowflake_table SNOWFLAKE TABLE --description "Production sales table" --url "https://example.snowflakecomputing.com/table/sales"
The following example creates an external metadata object using JSON:
databricks external-metadata create-external-metadata tableau_dashboard TABLEAU DASHBOARD --json '{"description": "Sales dashboard", "owner": "user@example.com"}'
The following example creates an external metadata object using a JSON file:
databricks external-metadata create-external-metadata bigquery_dataset GOOGLE_BIGQUERY DATASET --json @external-metadata.json
databricks external-metadata delete-external-metadata
Delete the external metadata object that matches the supplied name. The caller must be a metastore admin, the owner of the external metadata object, or a user that has the MANAGE privilege.
databricks external-metadata delete-external-metadata NAME [flags]
Arguments
NAME
Name of the external metadata object to delete.
Options
Examples
The following example deletes an external metadata object:
databricks external-metadata delete-external-metadata my_snowflake_table
databricks external-metadata get-external-metadata
Get the specified external metadata object in a metastore. The caller must be a metastore admin, the owner of the external metadata object, or a user that has the BROWSE privilege.
databricks external-metadata get-external-metadata NAME [flags]
Arguments
NAME
Name of the external metadata object to get.
Options
Examples
The following example gets an external metadata object:
databricks external-metadata get-external-metadata my_snowflake_table
databricks external-metadata list-external-metadata
List external metadata objects in the metastore. If the caller is the metastore admin, all external metadata objects will be retrieved. Otherwise, only external metadata objects that the caller has BROWSE on will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
databricks external-metadata list-external-metadata [flags]
Options
--page-size int
Maximum number of external metadata objects to return per page.
--page-token string
Token to retrieve the next page of results.
Examples
The following example lists all external metadata objects:
databricks external-metadata list-external-metadata
The following example lists external metadata objects with pagination:
databricks external-metadata list-external-metadata --page-size 10
databricks external-metadata update-external-metadata
Update the external metadata object that matches the supplied name. The caller can only update either the owner or other metadata fields in one request. The caller must be a metastore admin, the owner of the external metadata object, or a user that has the MODIFY privilege. If the caller is updating the owner, they must also have the MANAGE privilege.
databricks external-metadata update-external-metadata NAME UPDATE_MASK SYSTEM_TYPE ENTITY_TYPE [flags]
Arguments
NAME
Name of the external metadata object.
UPDATE_MASK
The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.
An asterisk (*) field mask indicates full replacement. It's recommended to always explicitly list the fields being updated and avoid using wildcards, as it can lead to unintended results if the API changes in the future.
SYSTEM_TYPE
Type of external system. Supported values: AMAZON_REDSHIFT, AZURE_SYNAPSE, CONFLUENT, DATABRICKS, GOOGLE_BIGQUERY, KAFKA, LOOKER, MICROSOFT_FABRIC, MICROSOFT_SQL_SERVER, MONGODB, MYSQL, ORACLE, OTHER, POSTGRESQL, POWER_BI, SALESFORCE, SAP, SERVICENOW, SNOWFLAKE, STREAM_NATIVE, TABLEAU, TERADATA, WORKDAY.
ENTITY_TYPE
Type of entity within the external system.
Options
--description string
User-provided free-form text description.
--json JSON
The inline JSON string or the @path to the JSON file with the request body
--owner string
Owner of the external metadata object.
--url string
URL associated with the external metadata object.
Examples
The following example updates the description of an external metadata object:
databricks external-metadata update-external-metadata my_snowflake_table "description" SNOWFLAKE TABLE --description "Updated production sales table"
The following example updates the owner of an external metadata object:
databricks external-metadata update-external-metadata my_snowflake_table "owner" SNOWFLAKE TABLE --owner "newowner@example.com"
The following example updates an external metadata object using JSON:
databricks external-metadata update-external-metadata my_snowflake_table "description,url" SNOWFLAKE TABLE --json '{"description": "Latest sales data", "url": "https://example.snowflakecomputing.com/table/sales_v2"}'
Global flags
--debug
Whether to enable debug logging.
-h or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format format
The log format type, text or json. The default value is text.
--log-level string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output type
The command output type, text or json. The default value is text.
-p, --profile string
The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.
--progress-format format
The format to display progress logs: default, append, inplace, or json
-t, --target string
If applicable, the bundle target to use