You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/integrate/redis-data-integration/reference/config-yaml-reference.md
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -195,29 +195,31 @@ advanced:
195
195
WHERE inv.total > 8000
196
196
```
197
197
198
-
### Form custom message key(s) for change event records
198
+
### Specifying custom message keys for change event records
199
199
200
-
- By default, Debezium uses the primary key column(s) of a table as the message key for records that it emits.
201
-
In place of the default, or to specify a key for tables that lack a primary key, you can configure custom message keys based on one or more columns.
200
+
By default, Debezium uses the primary key column(s) of a table as the message key for the
201
+
records that it emits. However, you might want to configure custom message keys based on
202
+
one or more columns to override this default behavior, or to specify message keys for tables
203
+
that don't have a primary key.
202
204
203
-
- To establish a custom message key for a table, list the table followed by the column to use as the message key. Each list entry takes the following format:
205
+
Use the `sources.tables` section of `config.yaml` to specify a custom message key for
206
+
one or more tables. List the columns you want to capture from the table under `columns` and
207
+
list the columns you want to use for the message key under `keys`, as shown below:
204
208
205
209
```yaml
206
210
# To include entries for multiple tables, simply add each table with its corresponding columns and keys under the 'tables' field.
207
211
tables:
208
-
<DATABASE_NAME>.<TABLE_NAME>:
209
-
columns:
210
-
- <COLUMN(S)_LIST> # List of columns to include
211
-
keys:
212
-
- <COLUMN(S)_LIST> # Column(s) to be used as the primary key
212
+
<DATABASE_NAME>.<TABLE_NAME>:
213
+
columns:
214
+
- <COLUMN(S)_LIST> # List of columns to include
215
+
keys:
216
+
- <COLUMN(S)_LIST> # Column(s) to be used together as the primary key
213
217
```
214
218
215
-
Notes:
216
-
217
-
- When specifying columns in the `keys` field, ensure that these same columns are also listed under the `columns` field in your configuration.
218
-
- There is no limit to the number of columns that can be used to create custom message keys. However, it’s best to use the minimum required number of columns to specify a unique key.
219
-
220
-
219
+
Note that you must add the columns you use for the message key to both the `keys` list and the
220
+
`columns`list. You can use as many columns as you like to create the custom message keys but we
221
+
recommend you use only the minimum set of columns required to guarantee a unique key for each
0 commit comments