You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/07/22 14:26:40 UTC

[GitHub] [incubator-seatunnel] zhangyuge1 opened a new issue, #2245: [Bug] [FakeSource Connector]java.sql.BatchUpdateException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row 1

zhangyuge1 opened a new issue, #2245:
URL: https://github.com/apache/incubator-seatunnel/issues/2245

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   when I use jdbc sink, an error has occurred.
   ![image](https://user-images.githubusercontent.com/49311144/180460212-087db632-a0e8-4c93-b78c-65c580738818.png)
   String sql = "CREATE TABLE test (\n" +
                   "  name VARCHAR(255) NOT NULL,\n" +
                   "  age INT NOT NULL\n" +
                   ")";
   
   source {
       FakeSource {
           result_table_name = "my_dataset"
         }
   }
   
   transform {
     sql {
       sql = "select name,age from my_dataset"
       result_table_name = "fake"
     }
   }
   
   sink {
     Jdbc {
         source_table_name = fake
         driver = com.mysql.cj.jdbc.Driver
         url = "jdbc:mysql://jdbc:3306/test"
         user = test
         password = test
         query = "insert into test(name,age) values(?,?)"
         batch_size = 2
     }
   
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #    http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   ######
   ###### This config file is a demonstration of streaming processing in seatunnel config
   ######
   
   env {
     # You can set flink configuration here
     execution.parallelism = 1
     job.mode = "BATCH"
     #execution.checkpoint.interval = 10000
     #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
   }
   
   source {
     # This is a example source plugin **only for test and demonstrate the feature source plugin**
       FakeSource {
           result_table_name = "my_dataset"
         }
   
     # If you would like to get more information about how to configure seatunnel and see full list of source plugins,
     # please go to https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Fake
   }
   
   transform {
     sql {
       sql = "select name,age from my_dataset"
       result_table_name = "fake"
     }
     # 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/flink/configuration/transform-plugins/Sql
   }
   
   sink {
     Jdbc {
         source_table_name = fake
         driver = com.mysql.cj.jdbc.Driver
         url = "jdbc:mysql://jdbc:3306/test"
         user = test
         password = test
         query = "insert into test(name,age) values(?,?)"
         batch_size = 2
     }
   
     # If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
     # please go to https://seatunnel.apache.org/docs/flink/configuration/sink-plugins/Console
   }
   ```
   
   
   ### Running Command
   
   ```shell
   jdbc e2e command
   ```
   
   
   ### Error Exception
   
   ```log
   Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### 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: commits-unsubscribe@seatunnel.apache.org.apache.org

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


[GitHub] [incubator-seatunnel] zhangyuge1 commented on issue #2245: [Bug] [FakeSource Connector]java.sql.BatchUpdateException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row 1

Posted by GitBox <gi...@apache.org>.
zhangyuge1 commented on issue #2245:
URL: https://github.com/apache/incubator-seatunnel/issues/2245#issuecomment-1193109968

   > you can add `CHARSET = 'utf8mb4'` when creating mysql table.
   
   It still doesn't work.
   String sql = "CREATE TABLE test (\n" +
                   "  name varchar(255) NOT NULL,\n" +
                   "  age int NOT NULL\n" +
                   ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4";
   


-- 
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


[GitHub] [incubator-seatunnel] github-actions[bot] commented on issue #2245: [Bug] [FakeSource Connector]java.sql.BatchUpdateException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row 1

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2245:
URL: https://github.com/apache/incubator-seatunnel/issues/2245#issuecomment-1495165758

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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


[GitHub] [incubator-seatunnel] adudu137 commented on issue #2245: [Bug] [FakeSource Connector]java.sql.BatchUpdateException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row 1

Posted by GitBox <gi...@apache.org>.
adudu137 commented on issue #2245:
URL: https://github.com/apache/incubator-seatunnel/issues/2245#issuecomment-1194857002

   > 
   
   you can add CHARSET = 'utf8mb4' when creating mysql database.


-- 
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


[GitHub] [incubator-seatunnel] zhaomin1423 commented on issue #2245: [Bug] [FakeSource Connector]java.sql.BatchUpdateException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'name' at row 1

Posted by GitBox <gi...@apache.org>.
zhaomin1423 commented on issue #2245:
URL: https://github.com/apache/incubator-seatunnel/issues/2245#issuecomment-1192986594

   you can add `CHARSET = 'utf8mb4'` when creating mysql table.


-- 
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