使用开始日期和结束日期对每个活动执行azure数据工厂 [英] Execute azure data factory foreach activity with start date and end date

查看:48
本文介绍了使用开始日期和结束日期对每个活动执行azure数据工厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个json文件,它包含开始日期和结束日期.我需要使用azure数据工厂foreach活动遍历此开始日期和结束日期.据我所知,foreach期望项目(集合/数组).但就我而言,我只有两项,即开始日期和结束日期.我想运行数据工厂来处理一些历史数据.我没有日期集合,那么如何用开始日期和结束日期进行迭代呢?如果有人可以帮助我解决问题,那就太好了.

I have a json file and it contains the start date and end date. I need to iterate over this start date and end date with azure data factory foreach activity. As per my knowledge, the foreach expect the items (collection/array). But in my case, I have only two items which are start and end date. I want to run the data factory for process some historic data. I don't have the collection of dates, so how can I iterate this with start date and end date? If someone can help me to figure it out, it would be great.

推荐答案

我的建议是使用

My suggestion will be to use the UNTIL activity to iterate from start date to end date.

与FOR-EACH一样,UNTIL也用于ADF中的循环.当for-each遍历定义的集合时,直到遍历直到满足条件为止.这等效于编程语言的while循环.

Like FOR-EACH, UNTIL is also used for looping in ADF. While for-each iterates over a defined collection, Until iterates till a criteria is met. This is equivalent of while loop of programming languages.

您可以为变量分配开始日期和结束日期,并使用计数器变量从开始日期到结束日期一一递增日期.

You can assign both start and end dates to a variable and use a counter variable to increment dates one by one from start to end date.

您可以使用AddDays 表达式功能,用于增加日期,并且等于函数来比较日期

You may use AddDays expression function for incrementing a day and equals function for comparing dates

这篇关于使用开始日期和结束日期对每个活动执行azure数据工厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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