【发布时间】:2019-01-10 14:36:14
【问题描述】:
我正在尝试实施 AWS Kinesis Analytics,但没有成功。我已经成功实现了 Kineses Stream、Kinesis Analytics 模式。当我打开实时分析(SQL 编辑器)时,我在“源数据”选项卡上有这个:
在“实时分析”选项卡上,我只得到“还没有到达任何行。”:
这是我的 SQL 查询:
-- ** Continuous Filter **
-- Performs a continuous filter based on a WHERE condition.
-- .----------. .----------. .----------.
-- | SOURCE | | INSERT | | DESTIN. |
-- Source-->| STREAM |-->| & SELECT |-->| STREAM |-->Destination
-- | | | (PUMP) | | |
-- '----------' '----------' '----------'
-- STREAM (in-application): a continuously updated entity that you can SELECT from and INSERT into like a TABLE
-- PUMP: an entity used to continuously 'SELECT ... FROM' a source STREAM, and INSERT SQL results into an output STREAM
-- Create output stream, which can be used to send to a destination
CREATE OR REPLACE STREAM "DESTINATION_SQL_STREAM" (LASTNAME VARCHAR(8), AGE REAL);
-- Create pump to insert into output
CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM"
-- Select all columns from source stream
SELECT STREAM LASTNAME, AGE
FROM "SOURCE_SQL_STREAM_001"
-- LIKE compares a string to a string pattern (_ matches all char, % matches substring)
-- SIMILAR TO compares string to a regex, may use ESCAPE
-- WHERE sector SIMILAR TO '%TECH%';
为什么DESTINATION_SQL_STREAM 没有收到任何数据?
谢谢!
注意:我每 1 秒通过以下命令发送相同的数据:while sleep 1; do aws kinesis put-record --stream-name Foo --partition-key 123 --data "{\"LASTNAME\": \"Hil3pet\", \"AGE\": 26}"; done
【问题讨论】:
标签: amazon-kinesis