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

   ### 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
   
   Reading data from a MySQL table and writing it into an Excel file on an SFTP 
server results in incorrect column order in the Excel file: the sequence does 
not match the order defined in sink_columns. 
   <img width="2919" height="278" alt="Image" 
src="https://github.com/user-attachments/assets/9713db7b-882f-4c47-80ce-2ea9170934d9";
 />
   
   <img width="3819" height="1995" alt="Image" 
src="https://github.com/user-attachments/assets/ca549c1f-634c-42f2-8904-7de3853c909a";
 />
   
   ### SeaTunnel Version
   
   2.3.2、2.3.8
   
   ### SeaTunnel Config
   
   ```conf
   {
     "env": {
       "execution.parallelism": 2,
       "job.mode": "BATCH"
     },
     "source": [
       {
         "password": "***",
         "database": "dataos_dev",
         "driver": "com.mysql.jdbc.Driver",
         "query": "select 
company_name,social_code,fd_1,fd_2,fd_3,fd_4,fd_5,fd_6,fd_7,fd_8,fd_9,fd_10,fd_138
 from test_table_tt ",
         "connection_check_timeout_sec": 100,
         "result_table_name": "jdbc1",
         "plugin_name": "Jdbc",
         "user": "dataos",
         "url": "jdbc:mysql://***/dataos_dev?serverTimezone=GMT%2b8"
       }
     ],
     "sink": [
       {
         "custom_filename": true,
         "file_format_type": "excel",
         "file_name_expression": "ftp40_pu.csv_${transactionId}",
         "host": "*****",
         "is_enable_transaction": true,
         "password": "***",
         "path": "/data/dataos/test/out",
         "plugin_name": "SftpFile",
         "port": "22022",
         "sink_columns": [
           "company_name",
           "social_code",
           "fd_1",
           "fd_2",
           "fd_3",
           "fd_4",
           "fd_5",
           "fd_6",
           "fd_7",
           "fd_8",
           "fd_9",
           "fd_10",
           "fd_138"
         ],
         "source_table_name": [
           "FtpFile_source_4"
         ],
         "user": "puaiuc"
       }
     ]
   }
   ```
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh -c ./job/mysql2sftp.json
   ```
   
   ### Error Exception
   
   ```log
   Program completed successfully
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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