天蓝色流分析同时结合数据
Posted
技术标签:
【中文标题】天蓝色流分析同时结合数据【英文标题】:azure stream analytics combine data with same time 【发布时间】:2017-05-18 07:02:17 【问题描述】:我正在使用 azure 流分析查询语言,但我在数据准备方面遇到了一些问题。this is my current output
但我想同时合并数据 例如在第一行 "46027020", "#A83","2017-05-18T08:47:26.5620000Z" 带有标题“IGEF_NR”、“Decklack”和“时间” 第二行:"46027070", "#475","2017-05-18T08:49:20.1750000Z"
【问题讨论】:
【参考方案1】:您需要将过滤器子查询拆分为“IGEF_NR”和“DECKLACK”,然后将两者连接起来。如下所示:
filter_IGEF AS
(
SELECT sub_id, value,time
FROM stringfilter
WHERE sub_id = 'IGEF_Nr'
),
filter_Decklack AS
(
SELECT sub_id, value,time
FROM stringfilter
WHERE sub_id = 'Decklack'
),
joined_value AS
(
SELECT
i.value AS IGEF_Nr,
d.value AS Decklack,
i.time as time
FROM filter_IGEF i
JOIN filter_Decklack d
ON i.time = d.time
AND DATEDIFF(second, i, d) BETWEEN 0 AND 5
)
SELECT IGEF_Nr, Decklack, time
INTO csv
FROM joined_value
【讨论】:
以上是关于天蓝色流分析同时结合数据的主要内容,如果未能解决你的问题,请参考以下文章