Reputation: 121
I have troubles when extracting data from DB using jdbc connector.
Some columns are number in Oracle but when extracting i got encoded values.
Here is an example:
col1 col2 col3 col4
100036061921 100049035196 100413362646 01
The result in my topic:
{
"col1": "BWBMnkE5f1sHNOKvb77Ht0ihv+fIQftrys3Z/TBOajX4LboFATPyuEsbgAAAAAAAAAAAAAAAAAAAAA\u003d\u003d",
"col2": "BWB6T7Z91Z/RUpevfd7yNAxnUF9YtFkFw/rJDw4aUDp1TIvXKANURhfLAAAAAAAAAAAAAAAAAAAAAA\u003d\u003d",
"col3": "BWBNLeG3IR80rH4seAWU6C6V7K5IunlyVI2u+F7fuY362YtxbCLmrsohgAAAAAAAAAAAAAAAAAAAAA\u003d\u003d",
"col4": "01"
}
Some one have any idea to fix this issue?
Many thanks.
Upvotes: 1
Views: 1107
Reputation: 121
Just fixed my issue after some googling.
Some "Numeric" DATA TYPES in DB are not best_fit
with Kafka Connect, so you have to specify some CAST to get the result needed.
Here is the reference: https://gist.github.com/rmoff/7bb46a0b6d27982a5fb7a103bb7c95b9#file-oracle-md
This may help Oracle,MS SQL SERVER, Postgre, Mysql users.
BR,
Achraf
Upvotes: 2