[英]AWS Kinesis Analytics - Data Aggregation
Ive been looking at AWS Kinesis analytics for some time now, and I struggle to make a following scenario work: 我一直在研究AWS Kinesis分析已有一段时间,而我努力使以下方案可行:
Say you have a Firehose that is connected to Kinesis Analytics as input stream. 假设您有一个Firehose作为输入流连接到Kinesis Analytics。 This firehose is meant to output data every 60s . 该流水线旨在每60秒输出一次数据。 I write data into this Firehose each 2s or so like: {"value":1}
. 我每2秒左右将数据写入Firehose ,例如: {"value":1}
。 Where the 1
is a random integer (can be 1, 5, 32 and so on). 其中1
是随机整数(可以是1、5、32,依此类推)。
How can I write my analytics to say find average value of all values reported in last 60s and pass it to a lambda? 我该如何写分析说出过去60年代报告的所有值的平均值并将其传递给lambda?
I tried using various windows - however the Analytics seems to output the data every few seconds, instead of once 60s. 我尝试使用各种窗口-但是Google Analytics(分析)似乎每隔几秒钟输出一次数据,而不是60秒一次。
please have a look into the following links which have detailed examples how to achieve this. 请查看以下链接,其中提供了如何实现此目的的详细示例。
https://docs.aws.amazon.com/kinesisanalytics/latest/sqlref/sql-reference-avg.html https://docs.aws.amazon.com/kinesisanalytics/latest/sqlref/sql-reference-avg.html
https://docs.aws.amazon.com/kinesisanalytics/latest/sqlref/sql-reference-windowed-aggregation-stream.html https://docs.aws.amazon.com/kinesisanalytics/latest/sqlref/sql-reference-windowed-aggregation-stream.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.