how can we have dynamic output file name in u-sql

2019-05-26 21:42发布

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://blobcontainer@blobstorage.blob.core.windows.net/**yyyymmdd**_TelDataOutput.Csv"

    USING Outputters.Csv(); 

1条回答
我命由我不由天
2楼-- · 2019-05-26 21:53

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();
查看更多
登录 后发表回答