Hello all, I’m reading a table from Postgres usin...
# troubleshooting
j
Hello all, I’m reading a table from Postgres using the JDBC connector. There is a column with postgres data type uuid, and that fails with below error. ---- error ---- class java.util.UUID cannot be cast to class java.lang.String (java.util.UUID and java.lang.String are in module java.base of loader 'bootstrap') ---- code ------ ddl = """ CREATE TABLE source_table( hostname string, uuid string ) WITH ( 'connector' = 'jdbc', 'url' = 'jdbc:postgresql://localhost:5432/mydatabase', 'table-name' = 'users', 'username' = 'postgres', 'password' = 'postgres' ) """ t_env.execute_sql(ddl) note:- t_env is created using streaming mode t_env = TableEnvironment.create(EnvironmentSettings.in_streaming_mode())
s
Hi! It’s not supported at the moment https://issues.apache.org/jira/browse/FLINK-19869
j
Is there anyway I can do it?
s
Not without custom changes in the JDBC connector
j
Okay, Is there any alternative approach to resolve this problem?
Much appreciated for your quick response.
m
Okay, Is there any alternative approach to resolve this problem?
Unfortunately not, except changing the JDBC connector yourself
😭 1
j
Thank you Marijn, Without JDBC connector what are the other ways to implement this solution. You mean I need to change the database column datatype from uuid to string.
👍 1
а
@Jagan Nalla Hello! Facing the same problem! Still no solution?
j
@Андрей Unfortunately not, we modified our column from uuid to string.