Skip to content

Commit ef70a73

Browse files
DOC-4549 rework custom message key section
1 parent 9b2206d commit ef70a73

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

content/integrate/redis-data-integration/reference/config-yaml-reference.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,29 +195,31 @@ advanced:
195195
WHERE inv.total > 8000
196196
```
197197

198-
### Form custom message key(s) for change event records
198+
### Specifying custom message keys for change event records
199199

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.
202204

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:
204208

205209
```yaml
206210
# To include entries for multiple tables, simply add each table with its corresponding columns and keys under the 'tables' field.
207211
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
213217
```
214218

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
222+
message.
221223

222224
## `processors`: RDI processors {#processors}
223225

0 commit comments

Comments
 (0)