From 60478be66ff8520dbf01aeef7528d0e09867bb57 Mon Sep 17 00:00:00 2001 From: mfvitale Date: Thu, 18 Jul 2024 12:38:18 +0200 Subject: [PATCH] DBZ-8018 Add note to JDBC documentation about the primary.key.fields --- documentation/modules/ROOT/pages/connectors/jdbc.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/documentation/modules/ROOT/pages/connectors/jdbc.adoc b/documentation/modules/ROOT/pages/connectors/jdbc.adoc index 8ee6d38c9..9298e0db2 100644 --- a/documentation/modules/ROOT/pages/connectors/jdbc.adoc +++ b/documentation/modules/ROOT/pages/connectors/jdbc.adoc @@ -156,6 +156,12 @@ To avoid this problem, apply the following settings in your environment: * Create the database table and primary key mappings in advance. ==== +[IMPORTANT] +==== +If a column maps to a data type that isn't permitted as a primary key for your target database, an explicit list of columns will be necessary in `primary.key.fields` excluding such columns. +Consult your specific database vendor's documentation for what data types are and are not permissible. +==== + // Type: procedure // Title: Configuring the {prodname} JDBC connector to delete rows when consuming `DELETE` or _tombstone_ events // ModuleID: debezium-jdbc-connector-configuring-the-connector-to-delete-rows @@ -803,7 +809,7 @@ You can set the xref:jdbc-property-primary-key-fields[`primary.key.fields`] prop When xref:jdbc-property-primary-key-mode[`primary.key.mode`] is set to `record_key` and the event's key is a primitive type, it is expected that this property specifies the column name to be used for the key. + + When the xref:jdbc-property-primary-key-mode[`primary.key.mode`] is set to `record_key` with a non-primitive key, or `record_value`, it is expected that this property specifies a comma-separated list of field names from either the key or value. -If the xref:jdbc-property-primary-key-mode[`primary.key.mode`] is set to `record_key` with a non-primitive key, or `record_value`, and this property is not specifies, the connector derives the primary key from all fields of either the record key or record value, depending on the specified mode. +If the xref:jdbc-property-primary-key-mode[`primary.key.mode`] is set to `record_key` with a non-primitive key, or `record_value`, and this property is not specified, the connector derives the primary key from all fields of either the record key or record value, depending on the specified mode. |[[jdbc-property-quote-identifiers]]<> |`false`