Hi, John. Could you share the exception stack to us and the schema of the `dummy` table in your database?
Best, Shengkai John Tipper <john_tip...@hotmail.com> 于2022年4月17日周日 21:15写道: > Hi all, > > I'm having some issues with getting a Flink SQL application to work, where > I get an exception and I'm not sure why it's occurring. > > I have a source table, reading from Kinesis, where the incoming data in > JSON format has a "source" and "detail-type" field. > > > CREATE TABLE `input` ( > `source` VARCHAR, > `detail-type` VARCHAR > ) WITH ( > 'connector' = 'kinesis', > 'format' = 'json', > ... > ) > > I have an output table called output writing to a table called dummy in a > JDBC database, where the JDBC database table has 2 columns, source and > detail-type. > > CREATE TABLE `output`( > `source` VARCHAR, > `detail-type` VARCHAR > ) WITH ( > 'connector' = 'jdbc', > 'table-name' = 'dummy', > ... > ) > > > I am trying to simply confirm I can write the data from input to output > without transformation: > > INSERT INTO `output`(`source`, `detail-type`) SELECT `source`, > `detail-type` from `input` > > > However, my Flink job has the following exception: > > > detail-type doesn't exist in the parameters of SQL statement INSERT INTO > dummy(source, detail-type) VALUES (:source, :detail-type) > > I get the same error when I try: > > INSERT INTO `output` SELECT`source`, `detail-type` from `input` > > > Can anyone please advise what I'm doing wrong? > > Many thanks, > > John > >