在 u-sql 查询中,通过 Outputterss.Csv() 函数将数据从一个 csv 文件转储到另一个文件,但带有列名的标题行出现在文件末尾而不是顶部。请在下面找到我的代码。感谢您的帮助。
@telDataResult=
SELECT
"vin" AS vin,
"outsideTemperature" AS outsideTemperature,
"EventProcessedUtcTime" AS EventProcessedUtcTime,
"PartitionId" AS PartitionId,
"EventEnqueuedUtcTime" AS EventEnqueuedUtcTime,
"IoTHub" AS IoTHub
FROM @telData
UNION
SELECT
t.vin ,
Convert.ToString(outsideTemperature) AS outsideTemperature
EventProcessedUtcTime ,
PartitionId ,
EventEnqueuedUtcTime ,
IoTHub
FROM
@telData AS t
UNION
SELECT
t.vin ,
Convert.ToString(outsideTemperature) AS outsideTemperature
EventProcessedUtcTime ,
PartitionId ,
EventEnqueuedUtcTime ,
IoTHub
FROM
@telData1 AS t;
OUTPUT @telDataResult
TO
@"wasb://blobcontainer@blobstorage.blob.core.windows.net/cluster/logs/2016/outputofADLA.csv"
USING Outputters.Csv();