Hey all, I’m running a Flink cluster getting some ...
# random
f
Hey all, I’m running a Flink cluster getting some data from Postgres using the JDBC connector. There is a column with postgres type uuid, and that fails with this error:
Caused by: java.lang.ClassCastException: class java.util.UUID cannot be cast to class java.lang.String (java.util.UUID)
So I get a need to convert it somehow. Should I convert in the query? What should the type be of the source database? I see some discussions here: https://issues.apache.org/jira/browse/FLINK-19869 but I’m unsure what the current situation is.
Slowly zooming in on the problem. More concrete question now is: How do I define that column in the source?
CREATE TABLE chat (id: STRING) WITH (<jdbc stuff>)
does not work, as it isn’t a string. I’ve seen RAW mentioned, but that doesn’t seem to parse. Do I need to create a custom type?
а
@Frank Lyaruu Hello! Facing the same issue! Have you solved a problem?
f
No, unfortunately not, moved away from Flink entirely, I couldn’t get a simple PoC up and running in time. Did you?
а
@Frank Lyaruu I managed to read kafka with Flink, but only declaring fields manually. Also managed to read from GreenPlum and join two streams. Writing to CSV also succeded. Writing to socket trying to send POST request ended with nothing, case i have no idea where to look for HTTP response. Summing up, my PoC also failed. 😃
f
It wouldn’t be fun if it was easy, right? 😉