我有下面的代码,其中我获得了完整的文件名集,并且对于所有文件名,我需要设置 in_progress_flag =1 。这是通过调用存储过程来完成的。
获取有效实体的输出如下
{
"count": 2,
"value": [
{
"Entity_Name": "Member",
"File_Name": "MemberPARQUET"
},
{
"Entity_Name": "Dealer_Group",
"File_Name": "Dealer_Group.PARQUET"
}
]}
存储过程有参数,它将从查找中获取 file_name 将其状态更新为 1。
目前我正在使用如下
@activity('Get Valid Entity Names').output.File_Name
失败并出现错误
"The expression 'activity('Get Valid Entity Names').output.File_Name' cannot be evaluated because property 'File_Name' doesn't exist, available properties are 'count, value, effectiveIntegrationRuntime, billingReference, durationInQueue'.",
有关如何将 Lookup 中的值调用到参数中的任何帮助,请
无法评估表达式“activity('Get Valid Entity Names').output.File_Name”,因为属性“File_Name”不存在,可用属性为“count、value、 effectiveIntegrationRuntime、billingReference、durationInQueue”。”
您收到的错误是因为查找输出不直接包含值数组下的
File_Name
属性,因此要访问它,您需要使用如下表达式:
@activity('Get Valid Entity Names').output.value[0].File_Name
由于 value 是一个数组,上面的表达式将从 0 中获取文件名,即值数组中的索引元素。
存储过程有参数,它将从查找中获取 file_name 将其状态更新为 1。
如果您想迭代每个文件名,请使用 Foreach 活动并将项目表达式传递为
@activity('Get Valid Entity Names').output.value
然后在 Foreach 下获取存储过程活动并使用
@item().File_Name
迭代每个文件