chuansenwang opened a new issue, #5244:
URL: https://github.com/apache/seatunnel/issues/5244

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   我利用容器部署了seatunnel集群,尝试从MySQL数据库同步数据到Hive仓库后,查询发现Hive中文字段乱码
   
   Mysql数据库查询展示
   123  张三      10
   124  李四      10
   
   Hive数据查询展示
   123,??,10
   124,??,10
   
   ### SeaTunnel Version
   
   seatunnel 2.3.2
   mysql 5.7
   hive 3.1.3
   hadoop 3.3.5
   jdk 1.8
   
   ### SeaTunnel Config
   
   ```conf
   env {
     job.name = "test_mysql_source_to_hive"
     execution.parallelism = 1
     job.mode = "BATCH"
   }
   source{
       jdbc {
           url = 
"jdbc:mysql://mysql-master:3306/test?serverTimezone=GMT%2b8&characterEncoding=utf-8"
           #driver = "com.mysql.cj.jdbc.Driver"
           driver = "com.mysql.jdbc.Driver"
           connection_check_timeout_sec = 100
           user = "root"
           password = "123456"
           query = "select id,name,age from student"
       }
   }
   
   transform {
       # If you would like to get more information about how to configure 
seatunnel and see full list of transform plugins,
       # please go to https://seatunnel.apache.org/docs/transform/sql
   }
   
   sink {
       Hive {
           table_name = "default.student"
           metastore_uri = "thrift://hive-metastore:9083"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   $SEATUNNEL_HOME/bin/seatunnel.sh --config 
$SEATUNNEL_HOME/config/MySQL2Hive.conf
   ```
   
   
   ### Error Exception
   
   ```log
   无
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   jdk 1.8
   
   ### Screenshots
   
   创建Hive语句
   CREATE TABLE  IF NOT EXISTS student(
     id INT COMMENT 'ID',
     name STRING COMMENT '名字',
     age INT COMMENT '年龄'
   )
   ROW FORMAT DELIMITED
   FIELDS TERMINATED BY ','
   LINES TERMINATED BY '\n';
   
   MySQL 数据库语句:
   CREATE TABLE `Student` (
     `id` bigint(20) NOT NULL,
     `name` varchar(255) DEFAULT NULL,
     `age` int(2) DEFAULT NULL,
     `sex` tinyint(1) DEFAULT NULL,
     `address` varchar(255) DEFAULT NULL,
     PRIMARY KEY (`id`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to