Open rmoff opened 5 years ago
Damn it! I got this
Damn it! I got this
The problem is still present
I got this error as well. DDL on my field is not null and doesn't have default value. How to ignore or set default value for this field?
Still got this as well
still got this.
Faced the same issue today.
same is today mysql,
Still present
I am facing this as well. This seems to be a common case. I could find that this is a design choice from the docs here
For backward-compatible table schema evolution, new fields in record schemas must be optional or have a default value. If you need to delete a field, the table schema should be manually altered to either drop the corresponding column, assign it a default value, or make it nullable.
But, manually changing the schema is a dirty solution and is not scalable. Do we have some workaround here? Or can we expect some fixes?
i have faced the same problem, any suggestion here. thanks. Here is my error log: Cannot ALTER TABLE "sink_connector_example"."test" to add missing field SinkRecordField{schema=Schema{io.debezium.connector.postgresql.Source:STRUCT}, name='source', isPrimaryKey=false}, as the field is not optional and does not have a default value at io.confluent.connect.jdbc.sink.DbStructure.amendIfNecessary(DbStructure.java:182) at io.confluent.connect.jdbc.sink.DbStructure.createOrAmendIfNecessary(DbStructure.java:83) at io.confluent.connect.jdbc.sink.BufferedRecords.add(BufferedRecords.java:122) at io.confluent.connect.jdbc.sink.JdbcDbWriter.write(JdbcDbWriter.java:74) at io.confluent.connect.jdbc.sink.JdbcSinkTask.put(JdbcSinkTask.java:90) at org.apache.kafka.connect.runtime.WorkerSinkTask.deliverMessages(WorkerSinkTask.java:601)
same problem here, it drive me crazy, it's 4AM in the weekend.
Streaming Avro data to MySQL with the JDBC Sink, connector aborts if switching from
"pk.mode": "none"
to"pk.mode": "kafka"
with the error:Connector config:
Logs:
If the table is dropped first, the connector then succeeds, creating the table from scratch with the additional columns.