Azure 数据工厂中正在处理的变量的动态列表
我有一个查找配置表,用于存储 1) 源表和 2) 要处理的变量列表,例如:
SQL 查找表:
tableA
、variableX、 variableY,variableZ
<-- tableA 不止这3个变量,即还有其他变量如variableV、变量W但不需要处理
tableB
, variableA,variableB
<-- tableB 不止这两个变量
因此,我需要动态连接到每个表并处理每个表中的特定变量。处理步骤是将儒略日期(整数格式)转换为标准日期(日期格式)。 SQL 查询示例:
select dateadd(dd, (variableX - ((variableX/1000) * 1000)) - 1, dateadd(yy, variableX/1000, 0)) FROM [dbo].[tableA]
问题是在 ADF
中设置 lookup 和 forEach 后,我不确定如何循环遍历变量数组(或字符串,因为 SQL DB 不允许我存储数组结果)并将所有这些变量转换为标准时间格式。
返回结果应该是要导出到接收器的处理后的数据集。
因此想检查一下在 ADF 中实现这一目标的最佳方法是什么?
谢谢你!
I have a lookup config table that stores the 1) source table and 2) list of variables to process, for example:
SQL Lookup Table:
tableA
, variableX,variableY,variableZ
<-- tableA has more than these 3 variables, i.e it has other variables such as variableV, variable W but they do not need to be processed
tableB
, variableA,variableB
<-- tableB has more than these 2 variables
Hence, I will need to dynamically connect to each table and process the specific variables in each table. The processing step is to convert the julian date (in integer format) to standard date (date format). Example of SQL query:
select dateadd(dd, (variableX - ((variableX/1000) * 1000)) - 1, dateadd(yy, variableX/1000, 0)) FROM [dbo].[tableA]
The problem is after setting up lookup and forEach in ADF
, I am unsure how to loop through the variable array (or string, since SQL DB does not allow me to store array results) and convert all these variables into the standard time format.
The return result should be a processed dataset to be exported to a sink.
Hence would like to check what will be the best way to achieve this in ADF?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在当地环境中重现过。请参阅以下步骤。
在 ForEach 活动中,添加查找活动以从控制表中获取变量列表,其中表名称是 ForEach 活动中的当前项目。
@split(activity('Lookup2').output.firstRow.table_variables,',')
I have reproed in my local environment. Please see the below steps.
Inside ForEach activity, add lookup activity to get the variables list from control table where table name is current item from ForEach activity.
@split(activity('Lookup2').output.firstRow.table_variables,',')