简体   繁体   English

使用日期格式的 Azure 数据工厂动态文件夹名称

[英]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.

相关问题 Azure 使用派生列的多种日期格式的数据工厂“数据流”时间转换 - Azure Data Factory 'Data Flow' time conversion for multiple Date Formats using Derived Column Azure数据工厂数据集动态文件夹路径 - Azure Data Factory Dataset Dynamic Folder Path Azure 数据工厂动态文件夹路径 - Azure Data Factory Dynamic Folder Path 使用Powershell在Azure数据工厂中的动态sqlReaderQuery - Dynamic sqlReaderQuery in azure data factory using powershell 用于创建新文件夹的 Azure 数据工厂 utcNow() 动态函数 - Azure Data Factory utcNow() dynamic function used to create new folder Azure 数据工厂:获取元数据:可以按文件夹类型过滤元数据并将文件夹名称传递给 For 循环 - Azure Data Factory :Get MetaData: Can filter the meta data by Folder Type and Pass the Folder Names to a For Loop Azure 数据工厂中的动态日期 - Dynamic dates in Azure Data Factory 无法使用 Azure 数据工厂中的删除活动删除文件夹 - Unable to delete folder using Delete activity in Azure Data factory 使用 Azure 数据工厂选择源中的当前月份文件夹 - Selecting the current month folder in source using Azure data Factory 无法使用 azure 数据工厂在 blob 容器内创建文件夹 - Unable to create a folder inside a blob container using azure data factory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM