镜像 Azure Databricks Unity 目录定义

本文详细介绍了镜像 Azure Databricks Unity 目录项的定义结构。

定义部件

此表列出了定义部件。

定义部件路径 类型 必选 DESCRIPTION
definition.json ContentDetails 描述项的镜像设置
.platform PlatformDetails (JSON) 描述项的常见详细信息

ContentDetails

描述有效负载的内容。

名称 类型 必选 DESCRIPTION
$schema 字符串 架构规范的 URL。
catalogName (目录名称) 字符串 Azure databricks 目录名称。
databricksWorkspaceConnectionId Guid Azure databricks 工作区连接 ID。
autoSync AutoSync 描述同步模式。 允许的值为: EnabledDisabled
mirroringMode MirroringMode 描述具有可能值的镜像模式: FullPartial
storageConnectionId Guid ADLS Gen2 存储连接 ID。
mirrorConfiguration MirrorConfiguration 从源系统复制元数据。 例如,使用此设置来镜像特定架构或特定表。

AutoSync

名称 DESCRIPTION
已启用 已启用自动同步。
禁用 禁用自动同步。

MirroringMode

名称 DESCRIPTION
完全 复制目录中的所有对象,但显式排除的架构和表除外。 如果未设置排除项,则默认为完全同步。
部分的 仅镜像选定的架构和表。 默认情况下,不会同步任何内容。

MirrorConfiguration 内容的说明

名称 类型 DESCRIPTION
架构 架构[] 要镜像的架构列表,每个架构都包含特定配置。

架构内容的说明

名称 类型 必选 DESCRIPTION
姓名 字符串 架构的名称,相对于父目录。
mirroringMode SchemaMirroringMode 描述镜像模式。 允许的值为: FullExcludePartial
Table[] 要镜像的架构中的表的列表。

SchemaMirroringMode

名称 DESCRIPTION
完全 镜像架构中除专门排除的表之外的所有内容。 如果未提供排除项,则默认同步所有内容。
部分的 仅镜像所选表。
排除 从镜像中排除所选架构。 仅当目录的镜像模式设置为 Full 时,此选项才可用。

表内容的说明

名称 类型 必选 DESCRIPTION
姓名 字符串 相对于父架构的表的名称。
mirroringMode TableMirroringMode 描述镜像模式。 允许的值为: FullExclude

TableMirroringMode

名称 DESCRIPTION
完全 镜像整个表。
排除 从镜像中排除所选表。 仅当架构的镜像模式设置为 Full 时,此选项才可用。

ContentDetails 示例 1

部分目录镜像的示例,其中目录中的特定架构是镜像的。

{
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "catalogName": "catalogName",
    "databricksWorkspaceConnectionId": "4eb6b767-e786-45ed-b7cf-d25023e52222",
    "autoSync": "Enabled",
    "mirroringMode": "Partial",
    "mirrorConfiguration": {
      "schemas": [
        {
          "name": "schema_3",
          "mirroringMode": "Full"
        },
        {
          "name": "schema_2",
          "mirroringMode": "Full"
        }
      ]
    }
}

ContentDetails 示例 2

部分目录镜像、完全镜像特定架构的示例,同时排除其中的某些表。

{
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "catalogName": "catalogName",
    "databricksWorkspaceConnectionId": "4eb6b767-e786-45ed-b7cf-d25023e52222",
    "autoSync": "Enabled",
    "mirroringMode": "Partial",
    "mirrorConfiguration": {
      "schemas": [
        {
          "name": "schema_3",
          "mirroringMode": "Full",
          "tables": [
            {
              "name": "table_1",
              "mirroringMode": "Exclude"
            }
          ]
        },
        {
          "name": "schema_2",
          "mirroringMode": "Full",
          "tables": [
            {
              "name": "table_2",
              "mirroringMode": "Exclude"
            }
          ]
        }
      ]
    }
}

ContentDetails 示例 3

部分目录镜像的示例,其中所选架构中的特定表会镜像。

{
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "catalogName": "catalogName",
    "databricksWorkspaceConnectionId": "4eb6b767-e786-45ed-b7cf-d25023e52222",
    "autoSync": "Disabled",
    "mirroringMode": "Partial",
    "mirrorConfiguration": {
      "schemas": [
        {
          "name": "schema_3",
          "mirroringMode": "Partial",
          "tables": [
            {
              "name": "table_1",
              "mirroringMode": "Full"
            }
          ]
        },
        {
          "name": "schema_2",
          "mirroringMode": "Partial",
          "tables": [
            {
              "name": "table_2",
              "mirroringMode": "Full"
            }
          ]
        }
      ]
    }
}

ContentDetails 示例 4

完整镜像的示例,其中整个目录是镜像的。

{
	"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "catalogName": "catalogName",
    "databricksWorkspaceConnectionId": "5eb6b767-e786-45ed-b7ef-d25023e52211",
    "autoSync": "Enabled",
    "mirroringMode": "Full"
}

ContentDetails 示例 5

完整目录镜像的示例,其中排除了目录中的特定架构。


{
	"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "CatalogName": "catalogName",
    "databricksWorkspaceConnectionId": "5eb6b767-e786-45ed-b7ef-d25023e52211",
    "autoSync": "Disabled",
    "mirroringMode": "Full",
    "mirrorConfiguration": {
      "schemas": [
        {
          "name": "schema_3",
          "mirroringMode": "Exclude"
        },
        {
          "name": "schema_2",
          "mirroringMode": "Exclude"
        }
      ]
    }
}

ContentDetails 示例 6

部分目录镜像的示例,其中所选架构中的特定表会镜像,而排除来自其他架构的表。

{
	"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/mirroredAzureDatabricksCatalog/definition/mirroredAzureDatabricksCatalogDefinition/1.0.0/schema.json",
    "catalogName": "catalogName",
    "databricksWorkspaceConnectionId": "4eb6b767-e786-45ed-b7cf-d25023e52222",
    "autoSync": "Disabled",
    "mirroringMode": "Partial",
    "mirrorConfiguration": {
      "schemas": [
        {
          "name": "schema_3",
          "mirroringMode": "Partial",
          "tables": [
            {
              "name": "table_1",
              "mirroringMode": "Full"
            }
          ]
        },
        {
          "name": "schema_2",
          "mirroringMode": "Full",
          "tables": [
            {
              "name": "table_2",
              "mirroringMode": "Exclude"
            }
          ]
        }
      ]
    }
}