Bicep 脚本,用于为源和目标或接收器创建 Azure 数据工厂数据集

问题描述 投票:0回答:1

我正在尝试不同的方法来为 Cosmos DB Mongo DB 类型创建 Azure 数据工厂的数据集以进行数据迁移,但在验证 Microsoft 链接时没有得到任何结果。

有人可以帮我在 Azure 数据工厂中创建类型为 cosmos DB mongo DB 类型的源和目标的数据集

azure-data-factory azure-bicep
1个回答
0
投票

为azure cosmos mongo db api创建linkedservice后,您可以使用下面的bicep脚本来创建数据集。

用于创建数据集的示例二头肌代码:

resource symbolicname 'Microsoft.DataFactory/factories/datasets@2018-06-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    annotations: [
      any
    ]
    description: 'string'
    folder: {
      name: 'string'
    }
    linkedServiceName: {
      parameters: {
        {customized property}: any()
      }
      referenceName: 'string'
      type: 'LinkedServiceReference'
    }
    parameters: {
      {customized property}: {
        defaultValue: any()
        type: 'string'
      }
    }
    schema: any()
    structure: any()
   type: 'CosmosDbMongoDbApiCollection'
   typeProperties: {
    collection: any()
  }

  }
}
  • type: 'CosmosDbMongoDbApiCollection':此行指定数据集资源的类型,在本例中为“CosmosDbMongoDbApiCollection”。

  • typeProperties: {...}:此部分包含数据集资源的特定于类型的属性。在本例中,它包括数据集将使用的集合的名称。

参考: MS 文档 - https://learn.microsoft.com/en-us/azure/templates/microsoft.datafactory/factories/datasets?pivots=deployment-language-bicep

© www.soinside.com 2019 - 2024. All rights reserved.