最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

avro - Convert Oracle NUMBER data type to Clickhouse valid data types - Stack Overflow

programmeradmin2浏览0评论

I am very new to Oracle CDC and how it works. Based on the Oracle documentation, I found that it could be very dynamic about the precision and scale (since it is not the fixed one like Number(s, p)).

The type of data when it is transferred using CDC is as below:

{
    "name": "USER_CODE",
    "type": {
        "type": "record",
        "namespace": "io.debezium.data",
        "name": "VariableScaleDecimal",
        "fields": [
            {
                "name": "scale",
                "type": "int"
            },
            {
                "name": "value",
                "type": "bytes"
            }
        ]
    }
}

The problem is that whenever I want to read it on Clickhouse, using Kafka Table Engine, I got the following error:

Type  Float64 is not compatible with Avro record:
"type": "record",
"namespace": "io.debezium.data",
"name": "VariableScaleDecimal",
"fields": [
    {
        "name": "scale",
        "type": "int"
    },
    {
        "name": "value",
        "type": "bytes"
    }
]

P.S.: I also used other types of data like Dynamic and Decimal, but I get the same error.

Question: Can some help me please to resolve this issue?

发布评论

评论列表(0)

  1. 暂无评论