DBZ-4588 Update Oracle and MySQL Boolean types custom converter examples
This commit is contained in:
parent
0d8fa4567d
commit
4588e32338
@ -1606,12 +1606,13 @@ The `BOOLEAN` column is internally mapped to the `TINYINT(1)` data type.
|
||||
When the table is created during streaming then it uses proper `BOOLEAN` mapping as {prodname} receives the original DDL.
|
||||
During snapshots, {prodname} executes `SHOW CREATE TABLE` to obtain table definitions that return `TINYINT(1)` for both `BOOLEAN` and `TINYINT(1)` columns. {prodname} then has no way to obtain the original type mapping and so maps to `TINYINT(1)`.
|
||||
|
||||
ifdef::community[]
|
||||
The operator can configure the out-of-the-box xref:{link-custom-converters}[`TinyIntOneToBooleanConverter` custom converter] that would either map all `TINYINT(1)` columns to `BOOLEAN` or if the `selector` parameter is set then a subset of columns could be enumerated using comma-separated regular expressions.
|
||||
endif::community[]
|
||||
|
||||
Following is an example configuration:
|
||||
To enable you to convert source columns to Boolean data types, {prodname} provides a `TinyIntOneToBooleanConverter` {link-prefix}:{link-custom-converters}#custom-converters[custom converter] that you can use in one of the following ways:
|
||||
|
||||
* Map all `TINYINT(1)` columns to `BOOLEAN` types.
|
||||
* Enumerate a subset of columns by using a comma-separated list of regular expressions. +
|
||||
To use this type of conversion you must set the `selector` parameter as shown in the following configuration example:
|
||||
+
|
||||
[source]
|
||||
----
|
||||
converters=boolean
|
||||
boolean.type=io.debezium.connector.mysql.converters.TinyIntOneToBooleanConverter
|
||||
|
@ -1355,11 +1355,12 @@ When the `decimal.handling.mode` property is set to `string`, the connector repr
|
||||
Oracle does not natively have support for a `BOOLEAN` data type; however,
|
||||
it is common practice to use other data types with certain semantics to simulate the concept of a logical `BOOLEAN` data type.
|
||||
|
||||
The operator can configure the out-of-the-box `NumberOneToBooleanConverter` custom converter that would either map all `NUMBER(1)` columns to a `BOOLEAN` or if the `selector` parameter is set,
|
||||
then a subset of columns could be enumerated using a comma-separated list of regular expressions.
|
||||
|
||||
Following is an example configuration:
|
||||
To enable you to convert source columns to Boolean data types, {prodname} provides a `NumberOneToBooleanConverter` {link-prefix}:{link-custom-converters}#custom-converters[custom converter] that you can use in one of the following ways:
|
||||
|
||||
* Map all `NUMBER(1)` columns to a `BOOLEAN` type.
|
||||
* Enumerate a subset of columns by using a comma-separated list of regular expressions. +
|
||||
To use this type of conversion you must set the `selector` parameter as shown in the following configuration example:
|
||||
+
|
||||
[source]
|
||||
----
|
||||
converters=boolean
|
||||
|
Loading…
Reference in New Issue
Block a user