apache / incubator-streampark

Make stream processing easier! Easy-to-use streaming application development framework and operation platform.
https://streampark.apache.org/
Apache License 2.0
3.91k stars 1.01k forks source link

[Bug] flink sql sink mysql error #2967

Closed zhugezifang closed 1 year ago

zhugezifang commented 1 year ago

Search before asking

Java Version

No response

Scala Version

2.12.x

StreamPark Version

2.2.0

Flink Version

1.14.5

deploy mode

None

What happened

flink sql

CREATE TABLE datagen ( f_sequence INT, f_random INT, f_random_str STRING, ts AS localtimestamp, WATERMARK FOR ts AS ts ) WITH ( 'connector' = 'datagen', -- optional options -- 'rows-per-second'='5', 'fields.f_sequence.kind'='sequence', 'fields.f_sequence.start'='1', 'fields.f_sequence.end'='200', 'fields.f_random.min'='1', 'fields.f_random.max'='500', 'fields.f_random_str.length'='10' );

CREATE CATALOG my_mysql_catalog WITH ( 'type' = 'jdbc', 'property-version' = '1', 'base-url' = 'jdbc:mysql://ip:3306/', 'default-database' = 'temp', 'username' = 'root', 'password' = '123456', 'database-type' = 'mysql', 'jdbc-driver' = 'com.mysql.jdbc.Driver' );

use CATALOG my_mysql_catalog; CREATE TABLE mysql_table ( f_sequence INT, f_random INT, f_random_str STRING, PRIMARY KEY (f_sequence) NOT ENFORCED ) WITH ( 'connector' = 'jdbc', 'table-name' = 'test' );

insert into mysql_table select f_sequence,f_random,f_random_str from datagen;

Error Exception

Caused by: org.apache.flink.table.api.ValidationException: Unsupported options found for 'jdbc'.

Unsupported options:

database-type
jdbc-driver

Supported options:

base-url
default-database
password
property-version
username

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

wolfboys commented 1 year ago

This is an error in your flinkjob itself, please check if you have added the Flink JDBC connector and if the parameters are correct.

zhugezifang commented 1 year ago

This is an error in your flinkjob itself, please check if you have added the Flink JDBC connector and if the parameters are correct.

hi,is there any examples in streampark website of flink sql job?