Re: flink table api 中数据库字段大小写问题

2020-08-10 文章 Jark Wu
我觉得原因应该是 postgres 中在建表的时候,默认会把字段名转成小写的,所以你在 Flink SQL 这边也要声明成小写的。 你可以在postgres 中看一下表的字段信息。 Best, Jark On Fri, 7 Aug 2020 at 13:48, lgs <9925...@qq.com> wrote: > schema是public > 问题在这里:ERROR: column "recordid" of relation "alarm_history_data" does not > exist > >

Re: flink table api 中数据库字段大小写问题

2020-08-06 文章 lgs
schema是public 问题在这里:ERROR: column "recordid" of relation "alarm_history_data" does not exist 数据库表里面是“recordId”,这里的提示变成了“recordid” -- Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink table api 中数据库字段大小写问题

2020-08-06 文章 Jark Wu
Hi,你的 alarm_history_data 表的 postgres 里面的 schema是 public 么? 如果不是的话,你需要显式地把 schema 名字声明到表名上,例如 schema 为 sch1,那么 FlinkSQL 里需要定义成 CREATE TABLE `sch1.alarm_history_data` ( ... ) with (...); select * from `sch1.alarm_history_data`; Best, Jark On Tue, 4 Aug 2020 at 14:58, lgs <9925...@qq.com> wrote:

flink table api 中数据库字段大小写问题

2020-08-04 文章 lgs
Hi, postgres字段包含大小写。 postgres_sink = """ CREATE TABLE alarm_history_data ( `recordId` STRING, `rowtime` TIMESTAMP(3), `action` STRING, `originalState`STRING, `newState` STRING, `originalCause`