kafka-connect-jdbc
kafka-connect-jdbc copied to clipboard
__debezium_unavailable_value in JSON column causes exception
I was experimenting on REPLICA IDENTITY DEFAULT in debezium (https://debezium.io/documentation/reference/stable/connectors/postgresql.html#postgresql-replica-identity), but it seems that the JDBCSinkConnector automatically tries to cast '__debezium_unavailable_value'
to jsonb, causing an exception.
Can we have a "protected value" of some kind to avoid this insert?
java.sql.BatchUpdateException: Batch entry 0 INSERT INTO "myschema"."mytable" ("id",'__debezium_unavailable_value'::jsonb,'__debezium_unavailable_value'::jsonb,14541,14541,'2022-06-02 03:08:26.859+00') ON CONFLICT ("id") DO UPDATE SET "json_payload"=EXCLUDED."json_payload","response_payload"=EXCLUDED."response_payload","_updated_time"=EXCLUDED."_updated_time" was aborted: ERROR: invalid input syntax for type json
i have the same problem i fix that by changing the config replica identity to full for that table https://debezium.io/blog/2019/10/08/handling-unchanged-postgres-toast-values/
I did the same, but it is quite more expensive, that I’d rather not keep for longer term
On Mon, Sep 19, 2022 at 10:57 PM t0nem1n @.***> wrote:
i have the same problem i fix that by changing the config replica identity to full for that table
https://debezium.io/blog/2019/10/08/handling-unchanged-postgres-toast-values/
— Reply to this email directly, view it on GitHub https://github.com/confluentinc/kafka-connect-jdbc/issues/1242#issuecomment-1251775192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4TGNVGB4N3PALJZF5DE3V7ER2LANCNFSM6AAAAAAQPCFREA . You are receiving this because you authored the thread.Message ID: @.***>
Also interested in this. It'd be convenient to selectively filter out some fields from the UPSERT based on makers.