Hi Jasmin, Vertica is not implemented as a JDBC dialect, which is a requirement for Flink to support this. You can find an overview of the currently supported JDBC dialects in the documentation [1]. It would be interesting if you could contribute support for Vertica towards Flink.
Best regards, Martijn Visser https://twitter.com/MartijnVisser82 https://github.com/MartijnVisser [1] https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/jdbc/ On Fri, 15 Apr 2022 at 14:27, Jasmin Redzepovic < jasmin.redzepo...@superbet.com> wrote: > Hello Flink community, > > I am getting this error when writing data to Vertica table: > > Exception in thread "main" org.apache.flink.table.api.ValidationException: > Unable to create a sink for writing table > 'default_catalog.default_database.VerticaSink’. > ... > Caused by: java.lang.IllegalStateException: Cannot handle such jdbc url: > jdbc:vertica://<host>:5433/sbtverticadb01 > > > This is the code for creating sink table and inserting into it: > > tEnv.executeSql(""" > CREATE TABLE VerticaSink ( > TICKET_ID STRING, > TICKET_CODE STRING, > BUSINESS_MARKET_CODE STRING, > BUSINESS_LINE_CODE STRING, > PRIMARY KEY (TICKET_ID) NOT ENFORCED > ) WITH ( > 'connector' = 'jdbc', > 'url' = 'jdbc:vertica://<host>:5433/sbtverticadb01', > 'table-name' = 'SBX_DE.FLINK_SINK2', > 'username' = ‘username', > 'password' = ‘password' > ) > "”") > > tEnv.executeSql(""" > INSERT INTO VerticaSink > SELECT TICKET_ID, TICKET_CODE, BUSINESS_MARKET_CODE, BUSINESS_LINE_CODE > from Transformation2 > "”") > > I downloaded jdbc driver for Vertica and added it into ./lib folder. > Does anyone have idea what could it be? I googled the error, but didn’t > find anything helpful. > > Thanks and best regards, > Jasmin > > This email is confidential and intended solely for the use of the > individual or entity to whom it is addressed. If you received this e-mail > by mistake, please notify the sender immediately by e-mail and delete this > e-mail from your system. Please be informed that if you are not the > intended recipient, you should not disseminate, distribute, disclose, copy > or use this e-mail in any way, the act of dissemination, distribution, > disclosure, copying or taking any action in reliance on the contents of > this information being strictly prohibited. This e-mail is sent by a > Superbet Group company. Any views expressed by the sender of this email are > not necessarily those of Superbet Group. Please note that computer viruses > can be transmitted by email. You are advised to check this email and any > attachments for the presence of viruses. Superbet Group cannot accept any > responsibility for any viruses transmitted by this email and/or any > attachments. >