当数据从oracle传输到hive时,模式融合格式会发生变化

vatpfxk5  于 2021-06-28  发布在  Hive
关注(0)|答案(0)|浏览(169)

我在使用合流时遇到了一个问题,我创建了一个以id作为增量列的jdbc源,并创建了一个hdfs接收器将数据写入配置单元。
在这之后,我使用hive来探索hive中的数据,我看到的是,在oracle中的id列变成了binary,而在oracle中的time列变成了timestamp。
以下是架构寄存器中的详细信息:

{
\"type\": \"record\",
\"name\": \"GAYS_KAKOUXINXI\",
\"fields\": [
    {
        \"name\": \"ID\",
        \"type\": [
            \"null\",
            {
                \"type\": \"bytes\",
                \"connect.version\": 1,
                \"connect.parameters\": {
                    \"scale\": \"0\"
                },
                \"connect.name\": \"org.apache.kafka.connect.data.Decimal\"
            }
        ]
    },
    {
        \"name\": \"DEP_ACTION_FLAG\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"SBMC\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"FXMC\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"FXLX\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"DD\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"KKJD\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"DEP_ACTION_TIME\",
        \"type\": [
            \"null\",
            {
                \"type\": \"long\",
                \"connect.version\": 1,
                \"connect.name\": \"org.apache.kafka.connect.data.Timestamp\"
            }
        ]
    },
    {
        \"name\": \"KKMC\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"GCSJ\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    },
    {
        \"name\": \"CSYS\",
        \"type\": [
            \"null\",
            \"string\"
        ]
    }
],
\"connect.name\": \"GAYS_KAKOUXINXI\"
}

这是我的schema-registry.properties:

listeners=http://0.0.0.0:18081
kafkastore.connection.url=localhost:2171
kafkastore.topic=_schemas
debug=false

这是我的connect-avro-distributed.properties:

bootstrap.servers=localhost:9092

group.id=connect-cluster

key.converter=io.confluent.connect.avro.AvroConverter
key.converter.schema.registry.url=http://localhost:8081
value.converter=io.confluent.connect.avro.AvroConverter
value.converter.schema.registry.url=http://localhost:8081

internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false

config.storage.topic=connect-configs

offset.storage.topic=connect-offsets

status.storage.topic=connect-statuses

producer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor
consumer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor

这是怎么发生的?我该怎么解决这个问题呢?这是架构注册表的配置问题吗?
致以最诚挚的问候,
飞然

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题