Search code examples
azureazure-data-factoryazure-data-lake

dynamic file format in dynamic datasets


I configured my ADLS2 Dataset as a Parquet format and partition my data by YY-MM-DD-HH like this.

@{item().Table_Name}/@{formatDateTime(utcnow(),'yyyy')}/@{formatDateTime(utcnow(),'MM')}/@{formatDateTime(utcnow(),'dd')}/@{item().Table_Name}@{formatDateTime(utcnow(),'HH')}

it's working fine and creates the filename in this folder like in each copy activity in for each table: table/2021/04/04/table12

I want to add '_' in my final file,i tried use concat function but it's not resolving correct format.

wanted structure.

table/2021/04/04/table_12.parquet


Solution

  • You don't have to call format multiple times. You can just call it once and set the format string, something like this:

    @concat('customer/',formatDateTime(utcnow(),'yyyy/MM/dd/HH/mm', '_'))