如何在U-SQL中转换数据类型和concat列?
@output =
SELECT DISTINCT (kco.ToString + "-" + hta_ref.ToString + "-" + his_ref.ToString) AS hs_isstaskID,
(kco.ToString + "-" + his_ref.ToString) AS HS_IssueID,
(kco.ToString + "-" + hta_ref.ToString) AS hs_task_ID,
*
FROM @input;
答案 0 :(得分:0)
ToString
是一种方法,因此通常使用方括号,例如
@output =
SELECT DISTINCT (kco.ToString() + "-" + hta_ref.ToString() + "-" + his_ref.ToString()) AS hs_isstaskID,
(kco.ToString() + "-" + his_ref.ToString()) AS HS_IssueID,
(kco.ToString() + "-" + hta_ref.ToString()) AS hs_task_ID,
*
FROM @input;
如果数据转换引起问题,则您可能需要按照here实施TryParse
。