微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

运动分析,来自子查询的数据聚合

如何解决运动分析,来自子查询的数据聚合

我正在尝试修改 aws kinesis 示例并添加 GROUP BY:

https://docs.aws.amazon.com/kinesisanalytics/latest/dev/examples-transforming-strings-variablecolumnlogparse.html

这个例子效果很好,但是当我想添加聚合时它会抛出一个错误

我与 group by 的代码

CREATE OR REPLACE STREAM "DESTINATION_sql_STREAM"(
            "column_A" VARCHAR(16),"column_B" VARCHAR(16),"column_C" VARCHAR(16),"COL_1" VARCHAR(16),"COL_2" VARCHAR(16),"COL_3" VARCHAR(16),"count_col" INT);

CREATE OR REPLACE PUMP "SECOND_STREAM_PUMP" AS
INSERT INTO "DESTINATION_sql_STREAM"
   SELECT STREAM  t."Col_A",t."Col_B",t."Col_C",t.r."COL_1",t.r."COL_2",t.r."COL_3",COUNT(t."Col_A")
   FROM (SELECT STREAM
            "ROWTIME","Col_A","Col_B","Col_C",VARIABLE_COLUMN_LOG_PARSE ("Col_E_Unstructured",'COL_1 TYPE VARCHAR(16),COL_2 TYPE VARCHAR(16),COL_3 TYPE VARCHAR(16)','|') AS r 
         FROM "SOURCE_sql_STREAM_001") as t
GROUP BY STEP(t.ROWTIME BY INTERVAL '60' SECOND),t."Col_A";

错误

您的 sql 代码中有错误。 更新您的应用程序时出现问题。错误消息:失败的 sql 命令:CREATE OR REPLACE PUMP "SECOND_STREAM_PUMP" AS INSERT INTO "DESTINATION_sql_STREAM" SELECT STREAM t."Col_A",COUNT(t."Col_A") FROM (SELECT STREAM "ROWTIME",'COL_1 TYPE VARCHAR(16),'|') AS r FROM "SOURCE_sql_STREAM_001") as t GROUP BY STEP(t.ROWTIME BY 间隔'60'秒),t.“Col_A”。 sql 错误消息:从第 11 行开始, 第 17 列到第 11 行,第 23 列:在表中找不到列“ROWTIME” 'T'

也许有人可以帮我解决这个错误

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。