user3714403
user3714403

Reputation: 101

how can we have dynamic output file name in u-sql in azure data lake based on timestamp job is excuted

how can we have dynamic output file name in u-sql in azure data lake based on timestamp when job is executed.Thanks for help.My code as below:

 OUTPUT @telDataResult
    TO 
    @"wasb://[email protected]/**yyyymmdd**_TelDataOutput.Csv"

    USING Outputters.Csv(); 

Upvotes: 2

Views: 1933

Answers (1)

Michael Rys
Michael Rys

Reputation: 6684

This feature is currently in development but not available yet. Feel free to add your vote to the feature request: https://feedback.azure.com/forums/327234-data-lake/suggestions/10550388-support-dynamic-output-file-names-in-adla

Once it becomes available, you would do the inverse of the fileset syntax on EXTRACT. Let's assume you have a column that is called eventdate in your rowset @res. Then the following OUTPUT statement would generate the files:

OUTPUT @res
TO "/{eventdate:yyyy}/{eventdate:MM}/{eventdate:dd}/result.csv"
USING Outputters.Csv();

Upvotes: 6

Related Questions