在“复制数据"活动中检索Blob文件名 [英] Retrieve blob file name in Copy Data activity

查看:42
本文介绍了在“复制数据"活动中检索Blob文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Web API下载json文件,并使用复制数据"活动和二进制副本将它们存储在blob存储中.接下来,我想使用另一个复制数据"活动从blob容器中的每个json文件中提取一个值,并将该值及其ID存储在数据库中.ID是文件名的一部分,但是有什么方法可以提取文件名?

I download json files from a web API and store them in blob storage using a Copy Data activity and binary copy. Next I would like to use another Copy Data activity to extract a value from each json file in the blob container and store the value together with its ID in a database. The ID is part of the filename, but is there some way to extract the filename?

推荐答案

您可以执行以下活动:

1)一个GetMetadata活动,配置一个指向blob文件夹的数据集,并将子项"添加到字段列表"中.

1) A GetMetadata activity, configure a dataset pointing to the blob folder, and add the Child Items in the Field List.

2)一个forEach活动,该活动从GetMetadata活动中获取每个项目并对其进行迭代.为此,您可以将Items配置为@activity('NameOfGetMetadataActivity').output.childItems

2) A forEach activity that takes every item from the GetMetadata activity and iterates over them. To do this you configure the Items to be @activity('NameOfGetMetadataActivity').output.childItems

3)在foreach内部,您可以使用以下函数提取每个文件的文件名:item().name

3) Inside the foreach, you can extract the filename of each file using the following function: item().name

按照您认为合适的方式继续操作之后,添加功能以获取ID或复制整个名称.

After this continue as you see fit, either adding functions to get the ID or copy the entire name.

希望这对您有帮助!

这篇关于在“复制数据"活动中检索Blob文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆