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

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

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

  1. {
  2. \"type\": \"record\",
  3. \"name\": \"GAYS_KAKOUXINXI\",
  4. \"fields\": [
  5. {
  6. \"name\": \"ID\",
  7. \"type\": [
  8. \"null\",
  9. {
  10. \"type\": \"bytes\",
  11. \"connect.version\": 1,
  12. \"connect.parameters\": {
  13. \"scale\": \"0\"
  14. },
  15. \"connect.name\": \"org.apache.kafka.connect.data.Decimal\"
  16. }
  17. ]
  18. },
  19. {
  20. \"name\": \"DEP_ACTION_FLAG\",
  21. \"type\": [
  22. \"null\",
  23. \"string\"
  24. ]
  25. },
  26. {
  27. \"name\": \"SBMC\",
  28. \"type\": [
  29. \"null\",
  30. \"string\"
  31. ]
  32. },
  33. {
  34. \"name\": \"FXMC\",
  35. \"type\": [
  36. \"null\",
  37. \"string\"
  38. ]
  39. },
  40. {
  41. \"name\": \"FXLX\",
  42. \"type\": [
  43. \"null\",
  44. \"string\"
  45. ]
  46. },
  47. {
  48. \"name\": \"DD\",
  49. \"type\": [
  50. \"null\",
  51. \"string\"
  52. ]
  53. },
  54. {
  55. \"name\": \"KKJD\",
  56. \"type\": [
  57. \"null\",
  58. \"string\"
  59. ]
  60. },
  61. {
  62. \"name\": \"DEP_ACTION_TIME\",
  63. \"type\": [
  64. \"null\",
  65. {
  66. \"type\": \"long\",
  67. \"connect.version\": 1,
  68. \"connect.name\": \"org.apache.kafka.connect.data.Timestamp\"
  69. }
  70. ]
  71. },
  72. {
  73. \"name\": \"KKMC\",
  74. \"type\": [
  75. \"null\",
  76. \"string\"
  77. ]
  78. },
  79. {
  80. \"name\": \"GCSJ\",
  81. \"type\": [
  82. \"null\",
  83. \"string\"
  84. ]
  85. },
  86. {
  87. \"name\": \"CSYS\",
  88. \"type\": [
  89. \"null\",
  90. \"string\"
  91. ]
  92. }
  93. ],
  94. \"connect.name\": \"GAYS_KAKOUXINXI\"
  95. }

这是我的schema-registry.properties:

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

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

  1. bootstrap.servers=localhost:9092
  2. group.id=connect-cluster
  3. key.converter=io.confluent.connect.avro.AvroConverter
  4. key.converter.schema.registry.url=http://localhost:8081
  5. value.converter=io.confluent.connect.avro.AvroConverter
  6. value.converter.schema.registry.url=http://localhost:8081
  7. internal.key.converter=org.apache.kafka.connect.json.JsonConverter
  8. internal.value.converter=org.apache.kafka.connect.json.JsonConverter
  9. internal.key.converter.schemas.enable=false
  10. internal.value.converter.schemas.enable=false
  11. config.storage.topic=connect-configs
  12. offset.storage.topic=connect-offsets
  13. status.storage.topic=connect-statuses
  14. producer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor
  15. consumer.interceptor.classes=io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor

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

暂无答案!

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

相关问题