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

放肆的年华 提交于 2019-12-22 11:18:00

问题


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:


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();


来源:https://stackoverflow.com/questions/37988752/how-can-we-have-dynamic-output-file-name-in-u-sql-in-azure-data-lake-based-on-ti

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!