问题描述
我正在尝试修改 aws kinesis 示例并添加 GROUP BY:
我与 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 (将#修改为@)