Share via


account metastores command group

Note

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 account metastores command group within the Databricks CLI contains commands to manage Unity Catalog metastores for an account. A metastore contains catalogs that can be associated with workspaces.

databricks account metastores create

Create a Unity Catalog metastore.

databricks account metastores create [flags]

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example creates a metastore using JSON:

databricks account metastores create --json '{"name": "my-metastore", "storage_root": "s3://my-bucket/metastore", "region": "us-west-2"}'

The following example creates a metastore using a JSON file:

databricks account metastores create --json @metastore.json

databricks account metastores delete

Delete a Unity Catalog metastore for an account, both specified by ID.

databricks account metastores delete METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity Catalog metastore ID.

Options

--force

    Force deletion even if the metastore is not empty.

Global flags

Examples

The following example deletes a metastore by ID:

databricks account metastores delete metastore-abc123

The following example force deletes a metastore:

databricks account metastores delete metastore-abc123 --force

databricks account metastores get

Get a Unity Catalog metastore from an account, both specified by ID.

databricks account metastores get METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity Catalog metastore ID.

Options

Global flags

Examples

The following example gets a metastore by ID:

databricks account metastores get metastore-abc123

databricks account metastores list

Get all Unity Catalog metastores associated with an account specified by ID.

databricks account metastores list [flags]

Options

Global flags

Examples

The following example lists all metastores:

databricks account metastores list

databricks account metastores update

Update an existing Unity Catalog metastore.

databricks account metastores update METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity Catalog metastore ID.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example updates a metastore using JSON:

databricks account metastores update metastore-abc123 --json '{"name": "updated-metastore"}'

The following example updates a metastore using a JSON file:

databricks account metastores update metastore-abc123 --json @update-metastore.json

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