gpt4 book ai didi

azure-data-factory - 在 Azure 数据工厂中为 If 条件引用 JSON 负载值

转载 作者:行者123 更新时间:2023-12-05 04:01:50 25 4
gpt4 key购买 nike

我有一个像这样的 Json 文件作为从 API 调用返回的有效负载 - 这是数据工厂中的 http 数据集类型。

{
"count": 2,
"name": "DatasetABC",
"columnNames": [
"Column_1",
"Column_2"

],
"rows": ["1234",
"5678"

]

}

我希望能够使用在 If 条件下返回的计数记录。我想知道我需要使用什么来获得“计数”的值,即 2。

感谢任何帮助。

最佳答案

根据您的描述,我想您可以使用 LookUp Activity在 Azure 数据工厂中。

查找事件可以从任何 Azure 数据工厂支持的数据源中检索数据集。在以下场景中使用它:

Dynamically determine which objects to operate on in a subsequent activity, instead of hard coding the object name. Some object examples are files and tables. Lookup activity reads and returns the content of a configuration file or table. It also returns the result of executing a query or stored procedure. The output from Lookup activity can be used in a subsequent copy or transformation activity if it's a singleton value. The output can be used in a ForEach activity if it's an array of attributes.

例如,也许您可​​以使用 IF activity 中的 @{activity('MyLookupActivity').output.firstRow.count} 访问计数值.

关于azure-data-factory - 在 Azure 数据工厂中为 If 条件引用 JSON 负载值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54934549/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com