0
我在數據湖分析中創建了一個數據庫。 然後填充我數據湖中文件的數據。 當我然後查詢我所做的表時,我有一些成功,但一些奇怪的錯誤。 (!怪我)DataLake Analytics USQL:無法比較數組中的兩個元素
這工作:WHERE [加蓋序號] == 「000074O1」 這不:WHERE [CTN號] == 「000074-1」
錯誤:
「」代碼生成期間發生系統故障,無法對 比較陣列中的兩個元素。「
這兩個字段都是字符串,所以我不確定它們有什麼區別。 其中一個(失敗的)也是我的索引&發行版的一部分 - 但如果這與我的問題有關,我會迷路。
下面是表格def,填充和最終查詢的所有代碼。 如果有人能幫助我理解我在做什麼錯誤!!? ...將是非常感激:)
腳本:創建表
CREATE TABLE IF NOT EXISTS Play.RawData
(
[CTN Number] string
,[SeqNo] long
,[UTC Time Stamp for Event] string
,[Biz step Description] string
,[Stamped Serial number] string
,[Container Status] string
< -- more columns -- >,
INDEX
idx_CTN CLUSTERED ([CTN Number],[SeqNo])
DISTRIBUTED BY HASH ([CTN Number],[SeqNo])
);
腳本:填充表
DECLARE @dir string = "/myDataPath/";
DECLARE @file_set_path string = @dir + "File_{date:yyyy}{date:MM}{date:dd}.DAT";
@results_1 =
EXTRACT
[CTN Number] string
,[UTC Time Stamp for Event] string
,[Biz step Description] string
,[Stamped Serial number] string
,[Container Status] string
< -- more columns -- >,
,date DateTime // virtual file set column
FROM @file_set_path
USING Extractors.Tsv();
INSERT INTO Play.RawData(
[CTN Number],
[SeqNo],
[UTC Time Stamp for Event],
[Biz step Description],
[Stamped Serial number],
[Container Status],
< -- more columns -- >
)
SELECT
[CTN Number],
ROW_NUMBER() OVER(PARTITION BY [CTN Number] ORDER BY [UTC Time Stamp for Event] ASC) ?? -1 AS [SeqNo],
[UTC Time Stamp for Event],
[Biz step Description],
[Stamped Serial number],
[Container Status]
FROM @results_1
WHERE
date >= DateTime.Parse("2013-01-01")
AND
date < DateTime.Parse("2013-02-01");
腳本:測試查詢
@table =
SELECT [UTC Time Stamp for Event],
[Biz step Description],
[CTN Number],
[Stamped Serial number]
FROM [CTN].[Play].[RawData]
WHERE
//[Stamped Serial number] == "000074O1";
[CTN Number] == "000074-1";
OUTPUT @table
TO "/output/results.tsv"
USING Outputters.Tsv(outputHeader:true);
喜邁克爾,我把它歸結爲用戶的錯誤,但你的答覆後,我創建了一個支持請求。支持請求號碼 - 117082816249723。希望能給你的URL和任何你需要的東西?只要我能做其他事情來協助就大喊大叫。非常感謝 – SimonB
謝謝西蒙......這應該足以讓調查開始。 –