【问题标题】:Azure Data Factory: read from csv and copy row by row to a cosmos dbAzure 数据工厂:从 csv 读取并逐行复制到 cosmos db
【发布时间】:2021-05-01 14:38:44
【问题描述】:

我是 Azure 数据工厂的新手。我正在尝试解决以下问题:

  1. 从 Azure Blob 读取 csv 文件
  2. 逐行解析并将每一行转储到现有的 cosmos db 中

我目前正在研究一种解决方案:

  1. 将数据从源 (csv) 复制到接收器(Azure 存储表)
  2. 解析表并将行复制到数据库中的 ForEach 活动

这是一个正确的方法吗?如果是,我应该如何设置 ForEach 活动的动态内容?


注意:

我已尝试过此解决方案 (link),但收到一条错误消息

Reading or replacing offers is not supported for serverless accounts

这意味着

CosmosDB Serverless is not currently supported as Sink for the Data flow in Azure Data Factory.

【问题讨论】:

  • 您是否尝试过使用查找来获取表格中的内容,然后逐行查找?表达式应该是这样的:@activity('Lookup1').output.value

标签: azure csv azure-data-factory azure-cosmosdb-sqlapi azure-data-factory-pipeline


【解决方案1】:

如果您使用 Lookup + ForEach 活动,则 Foreach 项应为:

@activity('Lookup1').output.value

您的解决方案可能很难实现。

由于您发现 Data Flow 不支持 Cosmos DB Serverless,我想您可以参考本教程:Copy Data From Blob Storage To Cosmos DB Using Azure Data Factory

它使用 copy active 将数据从 Blob Storage 中的 csv 文件直接复制到 Azure Cosmos DB。

【讨论】:

    猜你喜欢
    • 2022-11-03
    • 2022-01-16
    • 2020-09-16
    • 1970-01-01
    • 1970-01-01
    • 2020-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多