使用USQL将CSV文件(Data Lake存储到Data Lake Analytics / Data Store)的日期格式化 [英] Cant Dateformat for CSV files (Data lake store to Data lake Analytics / Data Store ) using USQL
问题描述
大家好,
我在azure data lake store中有日期数据类型列的csv文件,我正在尝试使用USQL代码进行更多转换,同时处理日期列我收到错误。
i have csv files with date datatype columns in azure data lake store, i am trying to do more transformation using USQL code, While dealing with date column i am getting error.
源文件:sample.csv
Source file : sample.csv
outputfile:opsample.csv
outputfile : opsample.csv
预期输出:没有触及源文件,我必须读取所有列,并且通常必须在源日期列的输出文件中间导出mm-dd-yy格式可以是mon-dd-yy / mm-dd-yyyy
Expected ouput: without touching source file, i have to read all the columns and commonly have to derive mm-dd-yy format in the output file interms of source date column can be mon-dd-yy / mm-dd-yyyy
附上示例代码以供参考。
sample code attached for reference.
string = " /BCBSvermot/DataSource/Sample.csv" ;
推荐答案
当我的输入是日期格式时,我可以转换。
When my input is date format , I can able to convert.
因为它是日期和字符串格式我无法格式化
Where as it's a combination of date and string format I can't able to format
输入文件样本
01-01-2019
01-01-2019
01012019
2019年1月01日
01 Jan 2019
预期产出
Expected output
01/01/2019
01/01/2019
01/01/2019
01/01/2019
01/01/2011
01/01/2019
任何人都可以帮忙解决这个问题。这种格式语法应该在你的数据库天蓝色数据分析中。
Can any one please help on this. This format syntax should be in u sql azure datalake analysis.
这篇关于使用USQL将CSV文件(Data Lake存储到Data Lake Analytics / Data Store)的日期格式化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!