我们是否可以在Azure数据工厂中对存储在Azure Blob存储中的CSV文件中存储的数据执行查找活动? [英] Can we perform lookup activity in Azure Data Factory on the data stored in CSV file which is stored in Azure Blob storage?

查看:77
本文介绍了我们是否可以在Azure数据工厂中对存储在Azure Blob存储中的CSV文件中存储的数据执行查找活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Azure Blob Storage中将值存储在CSV文件中,然后读取Copy活动中的值(作为参数),以便使用SQL从源过滤数据。 CSV文件只包含一个值。

I have a requirement where I need to store a value in CSV file in Azure Blob Storage, then read the value(as parameter) in Copy activity for filtering data from source using SQL. The CSV file will contain only a single value.

我正在尝试通过对CSV文件执行查找活动,然后在复制活动源SQL中使用该值。

I am trying to do it by doing lookup activity on CSV file and then use that value in Copy Activity source SQL.

任何人都可以帮助我吗?有没有其他方法可以做同样的事情?

Can anyone help me in that? Is there any other way to do the same?

推荐答案

嗨Prachee,

Hi Prachee,

是的,您可以在Blob存储中存储csv文件中的值。为此,您必须使用set变量活动链接Lookup活动,如下所示:

Yes, you can store values from a csv file in Blob storage. To do so, you will have to chain a Lookup activity with a set variable activity as shown below :

在set变量活动中,您可以使用动态内容访问Lookup活动的输出以获取您想要获取的值。它可能是这样的:

In the set variable activity, you can use dynamic content to access the output of the Lookup activity to get the value you want to get. It could be something like :

@string(activity('Lookup1')。output.firstRow.size)

@string(activity('Lookup1').output.firstRow.size)

快速提示 - 尝试运行管道在调试模式下查看Lookup活动输出的结构。一旦你有了结构,就可以如上所示形成一个动态表达式,并将它存储在一个变量中。

Quick Tip - Try running the pipeline in debug mode to see the structure of the output of Lookup activity. Once you have the structure, you can formulate a dynamic expression as shown above, and store it in a variable.

注意:请使用字符串函数将对象转换为字符串(即可以存储在变量中。

Note: Please use the string function to convert the object to a string (that can be stored in variables).

希望这会有所帮助。


这篇关于我们是否可以在Azure数据工厂中对存储在Azure Blob存储中的CSV文件中存储的数据执行查找活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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