引用Azure数据工厂中的JSON有效负载值以了解是否满足条件 [英] Referencing JSON payload value in Azure Data Factory for If condition
问题描述
我有一个Json文件,例如从API调用返回的有效负载-这是数据工厂中的http数据集类型.
I have a Json file like so as a payload returned from an API call - which is an http dataset type in data factory.
{
"count": 2,
"name": "DatasetABC",
"columnNames": [
"Column_1",
"Column_2"
],
"rows": ["1234",
"5678"
]
}
我希望能够使用If条件中返回的计数记录.我想知道我需要使用什么来获得2的计数"值.
I would like to be able to use the count records returned in an If condition. Im wondering what I need to use to get the value of "count" which is 2.
任何帮助表示赞赏.
推荐答案
Based on your description, i suppose you could use LookUp Activity in Azure Data Factory.
查找活动可以从任何Azure数据工厂支持的数据源中检索数据集.在以下情况下使用它:
Lookup activity can retrieve a dataset from any of the Azure Data Factory-supported data sources. Use it in the following scenario:
动态确定在后续操作中要操作的对象 活动,而不是硬编码对象名称.一些对象的例子 是文件和表.查找活动读取并返回以下内容 配置文件或表.它还返回执行结果 查询或存储过程. Lookup活动的输出可以是 如果是 单例值.如果输出是,则可以在ForEach活动中使用该输出 属性数组.
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.
For example,maybe you could access the count value by using @{activity('MyLookupActivity').output.firstRow.count}
in the IF activity.
这篇关于引用Azure数据工厂中的JSON有效负载值以了解是否满足条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!