account metastores 命令组

注释

Databricks CLI 的使用须遵守 Databricks 许可Databricks 隐私声明,包括任何数据使用规定。

account metastores Databricks CLI 中的命令组包含用于管理帐户的 Unity 目录元存储的命令。 元存储包含可与工作区关联的目录。

databricks 帐户元存储创建

创建 Unity 目录元存储。

databricks account metastores create [flags]

选项

--json JSON

    包含请求正文的内联 JSON 字符串或 @path 到 JSON 文件

全局标志

示例

以下示例使用 JSON 创建元存储:

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

以下示例使用 JSON 文件创建元存储:

databricks account metastores create --json @metastore.json

databricks 帐户元存储删除

删除由 ID 指定的帐户的 Unity 目录元存储。

databricks account metastores delete METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity 目录元存储 ID。

选项

--force

    即使元存储不为空,也必须强制删除。

全局标志

示例

以下示例按 ID 删除元存储:

databricks account metastores delete metastore-abc123

以下示例强制删除元存储:

databricks account metastores delete metastore-abc123 --force

databricks 帐户元存储获取

从 ID 指定的帐户获取 Unity 目录元存储。

databricks account metastores get METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity 目录元存储 ID。

选项

全局标志

示例

以下示例按 ID 获取元存储:

databricks account metastores get metastore-abc123

databricks 帐户元存储列表

获取与 ID 指定的帐户关联的所有 Unity 目录元存储。

databricks account metastores list [flags]

选项

全局标志

示例

以下示例列出所有元存储:

databricks account metastores list

databricks 帐户元存储更新

更新现有的 Unity 目录元存储。

databricks account metastores update METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity 目录元存储 ID。

选项

--json JSON

    包含请求正文的内联 JSON 字符串或 @path 到 JSON 文件

全局标志

示例

以下示例使用 JSON 更新元存储:

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

以下示例使用 JSON 文件更新元存储:

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

全局标志

--debug

  是否启用调试日志记录。

-h--help

    显示 Databricks CLI、相关命令组或相关命令的帮助。

--log-file 字符串

    一个字符串,表示要将输出日志写入到的文件。 如果未指定此标志,则默认会将输出日志写入到 stderr。

--log-format 格式

    日志格式类型,textjson。 默认值为 text

--log-level 字符串

    一个表示日志格式级别的字符串。 如果未指定,则禁用日志格式级别。

-o, --output 类型

    命令输出类型为 textjson。 默认值为 text

-p, --profile 字符串

    要用于运行命令的 ~/.databrickscfg 文件中的配置文件名称。 如果未指定此标志,并且存在命名为 DEFAULT 的配置文件,则使用该配置文件。

--progress-format 格式

    显示进度日志的格式: defaultappendinplacejson

-t, --target 字符串

    如果适用,要使用的捆绑包目标