Hi,
I´trying to write to a postgres table but the job fails on a column of type
varchar[].
I get the following error:
Caused by: java.lang.IllegalStateException: Writing ARRAY type is not yet
supported in JDBC:PostgreSQL.
After getting data from a kafka topic, my code looks like this:
tableEnv.executeSql(
s"""
|create table cities (
| id varchar primary key,
| cities varchar array
|) WITH (
| 'connector' = 'jdbc',
| 'url' =
'jdbc:postgresql://$postgresHost:$postgresPort/$postgresDatabase',
| 'username' = '$postgresUsername',
| 'password' = '$postgresPassword',
| 'table-name' = 'public.cities'
|)
|""".stripMargin
)
tableEnv.executeSql(
""" insert into cities
| select
| id,
| cities
| from source_table """.stripMargin
)
tableEnv.execute("SomeJob")
The column `cities` is indeed the problem as changing the data type to
varchar (in both table and stream) solves the issue.
Can anybody suggest a workaround?
flink 1.12.1
flink-connector-jdbc_2.12-1.12.1
postgres jdbc driver 42.2.20.jre7
Thanks
Federico
--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/