I am using JDBC source connector to read data from a Teradata table and push to Kafka topic . But when I am trying to use JDBC sink connector to read Kafka topic and push to Oracle table it throws the below ERROR.
I am sure the error is because of the parameters pk.mode
and pk.fields
which I am not sure what to use.
My terradata has a primary key UserID+ DatabaseID . I have created the table in Oracle with the primay key as Userid+databaseID.
** ERROR Cannot ALTER to add missing field SinkRecordField{schema=Schema{BYTES},
name='CreateUID', isPrimaryKey=true}, as it is not
optional and does not have a default value**
Below is my sink connector-
{name=teradata_sink
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
tasks.max=1
topics=TERADATA_ACCESSRIGHTS
connection.url=
connection.user=
connection.password=
auto.create=false
table.name.format=TERADATA_ACCESSRIGHTS
pk.mode=record_value
pk.fields=USERID+DATABASEID
auto.evolve=true
insert.mode=upsert
}
Please suggest how can I use the JDBC sink connector with the given primary keys.