[英]Azure Data Factory dynamic folder names using date formats
I'm having an issue creating the syntax for aa wildcard path expression within my data flow.在我的数据流中创建通配符路径表达式的语法时遇到问题。
We have data coming from a data lake container with a folder structure like the one below with the YYYY/MM/DD being dynamic:我们有来自数据湖容器的数据,其文件夹结构如下所示,其中 YYYY/MM/DD 是动态的:
sensor/micActivatedEvent/YYYY/MM/DD/*
I created the below expression but it doesn't seem to be working.我创建了以下表达式,但它似乎不起作用。 I'm trying to load the latest set of files for when the trigger runs the pipeline
我正在尝试加载触发器运行管道时的最新文件集
@concat(utcNow('yyyy'),'/',utcNow('MM'),'/',utcNow('dd'),'/*')
Yes, you can do this by following the below format,是的,您可以按照以下格式执行此操作,
Use the formatDateTime()
on utcnow()
with the appropriate format that you need to show year, month and date.使用
utcnow()
formatDateTime()
并使用您需要显示年、月和日期的适当格式。
Example sample code:示例示例代码:
Case 1:情况1:
@concat('sensor/micActivatedEvent/', formatDateTime(utcnow(), 'yyyy/MM/dd'))
Case 2:案例二:
Thanks to @Himanshu
below is referred from here .感谢
@Himanshu
下面是从这里提到的。
@concat('sensor/micActivatedEvent','/',formatDateTime(utcnow(),'yyyy'),'/',formatDateTime(utcnow(),'MM'),'/',formatDateTime(utcnow(),'dd'))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.