简体   繁体   English

Azure流分析临时查询

[英]Azure Stream Analytics temporal queryes

i'm new to Azure and i'm not sure if i'm getting right the query system. 我是Azure的新手,我不确定查询系统是否正确。 I have and application that sends data in every 1.5s to my Service Bus and i need to get my data to PowerBI in real-time. 我有一个应用程序,它每1.5秒将数据发送到我的服务总线,我需要实时将数据发送到PowerBI。 The simplest query 最简单的查询

SELECT * FROM DataSource

return all data and i can't use it to see real-time events. 返回所有数据,我不能用它来查看实时事件。 So i searched and i found about Temporal Queryes, but every example i follow doesn't seems to help me (probably i'm not doing it right). 因此,我进行了搜索,发现了有关“时间查询”的信息,但是我遵循的每个示例似乎都没有帮助我(可能我做得不好)。 Here's my query: 这是我的查询:

SELECT id, pais, temp, vel, son, lon, lat, hora, dia, colisao, multa, motor, System.timestamp as time, COUNT(*)
FROM fakentrance TIMESTAMP BY time
GROUP BY
id, pais, temp, vel, son, lon, lat, hora, dia, colisao, multa, motor,
TUMBLINGWINDOW(s, 2)

Beeing more specific, what i need to do is something like: If my toy car is accelerating i can have a gauge to show it's increase or decrease in acceleration, or the real temperature of my room, so if it's 30°c and it drops to 16°C it's show this exactly value. 更具体的说,我需要做的是:如果我的玩具车在加速,我可以用一个仪表来显示它的加速度或房间的实际温度的升高或降低,因此,如果温度是30°C并且下降至16°C时,将显示此精确值。 What am i doing wrong? 我究竟做错了什么?

Make sure that you have defined both your input and output correctly and include them in your query. 确保正确定义了输入和输出,并将它们包括在查询中。

 SELECT id, pais, temp, vel, son, lon, lat, hora, dia, colisao, multa, motor, System.timestamp as time, COUNT(*)
    INTO
    <PowerBIOutput>
    FROM <DataSource> TIMESTAMP BY time
    GROUP BY
    id, pais, temp, vel, son, lon, lat, hora, dia, colisao, multa, motor, TUMBLINGWINDOW(s, 2)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM