Hi,
I am currently facing an encoding problem with oracle 19 as source and Kafka Connect Version in version 3.5.0
This is my current connector config:
{
“name”: “con-name”,
“config”: {
“connector.class”: “io.confluent.connect.jdbc.JdbcSourceConnector”,
“timestamp.column.name”: “LMD”,
“transforms.RenameField.renames”: “ID:CID”,
“incrementing.column.name”: “ID”,
“connection.password”: “typepwhere”,
“tasks.max”: “1”,
“transforms.ReplaceField.type”: “org.apache.kafka.connect.transforms.ReplaceField$Value”,
“transforms”: “ReplaceField,RenameField,Cast”,
“table.types”: “view”,
“table.whitelist”: “schema.view_name”,
“mode”: “timestamp+incrementing”,
“numberic.mapping”: “best_fit”,
“topic.prefix”: “prefix.topicname”,
“connection.user”: “oracle_app_user”,
“transforms.RenameField.type”: “org.apache.kafka.connect.transforms.ReplaceField$Value”,
“db.timezone”: “CET”,
“connection.url”: “jdbc:oracle:thin:@//orahostname:1524/servicename”,
“transforms.ReplaceField.blacklist”: “CID, LMD”,
“transforms.Cast.type”: “org.apache.kafka.connect.transforms.Cast$Value”,
“transforms.Cast.spec”: “CID:int64,PID:int64,CPY:int64,PPID:int64”
}
}
Transport works correct - If I update a fieldvalue in the view, the records immediately gets transported in the designated Kafka topic.
I tried many options in values for the string data types and located a problem with special characters and umlauts.
Here an example: “BUTTON02_CAPTION”:“SP��TER”
I updated the BUTTON02_CAPTION field as “SPÄTER” in oracle.
Regarding the oracle database we use the following nls_params:
SQL> SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER IN (‘NLS_CHARACTERSET’, ‘NLS_NCHAR_CHARACTERSET’);
PARAMETER
VALUE
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_CHARACTERSET
UTF8
I tried to update the connector with the “characterEncoding”: “UTF8”.
I also extended the connection.url param like this: “connection.url”: “jdbc:oracle:thin:@//orahostname:1524/servicename”?useUnicode=true&characterEncoding=UTF-8"
Anyone else here facing the same issue, or maybe already fixed it?
I appreciate any help!
Thanks a lot!
Phips