write UUID in Vertica with jooQ
NickName:Hayami Pysh Ask DateTime:2020-04-15T18:46:19

write UUID in Vertica with jooQ

I don't have jOOQ generated classes, so, I want to use my class and write it to vertica.

    Table<Record> table = DSL.table(DATA_TABLE_NAME);    
    for (Data d : data) {
          dsl.insertInto(table, Arrays.asList(
             DSL.field(name("uuid"), SQLDataType.UUID)
          ))
          .values(
             d.getUuid(),
          ).execute();
    }

In PostgreSql it works, but in Vertica it generate this exception

[Vertica][VJDBC](2631) ERROR: Column "uuid" is of type uuid but expression is of type varchar

How can I write uuid tu Vertica without generated class? d.getUuid() returns java.Util.UUID

Copyright Notice:Content Author:「Hayami Pysh」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61226843/write-uuid-in-vertica-with-jooq

More about “write UUID in Vertica with jooQ” related questions

write UUID in Vertica with jooQ

I don't have jOOQ generated classes, so, I want to use my class and write it to vertica. Table&lt;Record&gt; table = DSL.table(DATA_TABLE_NAME); for (Data d : data) { dsl.

Show Detail

Customizing UUID type for mysql in jooq

I'm porting a java application to jooq. Currently, I have separate classes for sql to support MySQL, MariaDB, and H2. I store UUID types differently in each because they have varying support. Maria...

Show Detail

UUID not working with JOOQ and PostgreSQL

Whenever I try to set or retrieve a field of UUID type, I get the following error from JOOQ: "Not supported by dialect : Type class java.util.UUID is not supported in dialect null" Everything else...

Show Detail

jOOQ : compare uuid(from postgresql) and string(user id in class)

My backend is postgresql. I am trying to write a simple function to fetch data from database, using jooq records. The DAO for this table is written by me. The problem I am facing is comparison of U...

Show Detail

Using UUID PK or FK in Firebird with Jooq

I have a table in Firebird with a PK column CREATE TABLE TEST ( ID CHAR(16) CHARACTER SET OCTETS NOT NULL, CONSTRAINT PK_TEST PRIMARY KEY (ID) ); OCTETS encoding are treated as bytes. I crea...

Show Detail

JOOQ - column "id" is of type uuid but expression is of type character varying

I'm having an issue related to JOOQ. --------- This is my "setup" that led to the issue. Table: CREATE TABLE "public".xyz ( id UUID NOT NULL, CONSTRAINT pk_t_xyz PRIMARY KEY(id) );

Show Detail

How to generate proper SQL for MySQL with jOOQ with UUID fields?

I'm using jOOQ 3.9.1 and try to generate table with UUID field. val sql = dsl.createTable("test").column("id", SQLDataType.UUID).column("val", SQLDataType.UUID.length(36).nullable(false)).getSQL()

Show Detail

Convert types of PostgreSQL UUID arrays using jOOQ

I am trying to bind a PostgreSQL (9.4) UUID array to an array of a wrapper class around each UUID. Please note that these wrappers are integrated throughout the application so removing them is not an

Show Detail

How do I write a pandas dataframe to Vertica?

I have some data set in a pandas data frame that I wish to write to Vertica. I've already created my table using the vertica_python library. What is the best way to write my data frame to Vertica?

Show Detail

Hadoop-Vertica Connector: Can I write to Vertica in Map procedure?

I am using Hadoop-Vertica Connector to import a large file into Vertica. I was trying to use hadoop to do that without the Reducer. However the vertica output table seems cannot initialize during

Show Detail