You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "RU-jiayijie (via GitHub)" <gi...@apache.org> on 2023/06/13 10:06:38 UTC

[GitHub] [seatunnel] RU-jiayijie commented on issue #4549: [Bug] [connector-hive] sink hive AbstractWriteStrategy.buildSchemaWithRowType NullPointerException

RU-jiayijie commented on issue #4549:
URL: https://github.com/apache/seatunnel/issues/4549#issuecomment-1588980402

   hive 表字段是不区分大小写的,所以你的query=中的字段必须 as 小写hive建表时的字段名 如下:
   `env {
     execution.parallelism = 1
     job.mode = "STREAMING"
     execution.checkpoint.interval = 60000
     format.fail-on-missing-field = false
   }
   
   source {
   
     Kafka {
       result_table_name = "xxxxx"
       format = json
       json.fail-on-missing-field = false
       json.ignore-parse-errors = true
       schema = {
         fields {
           EvnetBody = "string"
           EventDay = "string"
           EventTime = "string"
         }
       }
       start_mode = "group_offsets"
       topic = "xxx"
       consumer.group = "xxxx"
       commit_on_checkpoint = true
       bootstrap.servers = "xxxxxxxxx"
     }
     
   }
   
   transform {
     sql {
       source_table_name = "xxxxxxxx"
       result_table_name = "xxxxxxxx"
       query = "select EvnetBody as eventbody, replace(EventDay,'-','') as dt, EventTime as hour from xxxxxxx",
     }
   }
   
   sink {
     Hive {
       source_table_name = "xxxxx"
       table_name = "test.xxxxx"
       metastore_uri = "xxxxxxx"
       fields = ["eventbody","dt","hour"]
     }
   }`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org