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

   ### 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
   
   
source为mysql,sink为clickhouse时,使用FieldMapper,如果mysql与clickhouse的表字段顺序不同,插入到clickhouse后,字段对应的数据会不一致。
   
![89158b637a3adb5fe4d324a04cc8cf8](https://github.com/apache/seatunnel/assets/37824176/75680929-7c19-4e79-833c-8f7a33f058b9)
   
   
   ### SeaTunnel Version
   
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   env {
   "job.mode"=BATCH
   "job.name"="SeaTunnel_Job"
   }
   source {
   Jdbc {
       "connection_check_timeout_sec"=30
       parallelism=1
       "result_table_name"=Table12372182520352
       query="SELECT `id`, `code`, `name` FROM `admin_langfang`.`depttt`"
       driver="com.mysql.cj.jdbc.Driver"
       password="123456"
       
url="jdbc:mysql://192.168.1.191:3306/seatunnel?useUnicode=true&characterEncoding=utf-8&useSSL=false"
       user=root
   }
   }
   transform {
   FieldMapper {
       "result_table_name"=Table12372182520353
       "source_table_name"=Table12372182520352
       "field_mapper" {
           id=id
           code=code
           name=name
       }
   }
   }
   sink {
   Clickhouse {
       username=default
       password="keli@1991"
       "clickhouse.config" {}
       "bulk_size"=20000
       "split_mode"="false"
       "support_upsert"="false"
       "allow_experimental_lightweight_delete"="false"
       "source_table_name"=Table12372182520353
       database="inside_data"
       table="depe_test"
       host="192.168.1.207:8123"
       
url="jdbc:clickhouse://192.168.1.207:8123/inside_data?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&autoReconnectForPools=true&connectTimeout=300000&socketTimeout=300000"
       driver="ru.yandex.clickhouse.ClickHouseDriver"
       user=default
   }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config ./config/test.template
   ```
   
   
   ### Error Exception
   
   ```log
   no error
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   使用zeta
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### 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