Azure 数据工厂 - 如何使用 ForEach 循环迭代和读取 CSV 文件中的记录?

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

我需要为数据域中的每一行生成一个唯一的“guid”,为此,我在复制活动中使用了一个附加列,如下所示。

Image 1 Description

由于它为每一行生成相同的 guid,因此我尝试使用查找并迭代“For Each”循环,如下所示。

Image 2 Description

在“For Each”循环中,我使用此表达式来检索值:

@activity('Lookup1').output.value

但是,我遇到了这个错误:

Image 3 Description

这是查找活动的示例输出:我使用 .csv 文件作为源

{
    "firstRow": {
        "Bill-to Customer Name": "****",
        "Bill-to Customer No_": "****",
        // ... (other fields)
        "ProjectCustomer_FullName": "****",
        "ProjectCustomer_ID": "****"
    },
    "effectiveIntegrationRuntime": "****",
    "billingReference": {
        "activityType": "****",
        // ... (other billing reference fields)
    },
    "durationInQueue": {
        "integrationRuntimeQueue": ****
    }
}

如何解决这个问题?感谢您对此的帮助。

azure csv azure-pipelines azure-data-factory lookup
1个回答
0
投票

你可以尝试一下吗 @activity('Lookup1').output.firstRow.ProjectCustomer_ID

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