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

   ### 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
   
   as we all know ,mongo save "price": 5.0 as numberInt save 5.1 as double,
   
   when mongo-cdc defined the type as doube ,when it meet numberint err happlen
   
   for example,save "price"
   {
   "price":NumberInt("10")----> NumberInt type
   }
   
   {
   "price":10.1----> double type
   }
   when cdc,a type error happlen ,because we had to set a type in 
schema.fields,if we set double, when meet int data ,err happlen,when set 
int,double data error happlen
   
   ### SeaTunnel Version
   
   2.3.4
   
   ### SeaTunnel Config
   
   ```conf
   source {
     MongoDB-CDC {
       hosts = "mongo0:27017"
       database = ["inventory"]
       collection = ["inventory.products"]
       username = stuser
       password = stpw
       schema = {
         fields {
           "_id" : string,
           "name" : string,
           "description" : string,
           "price" : double,  --------when meet numberInt ,err~~~
         }
       }
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   docker
   ```
   
   
   ### Error Exception
   
   ```log
   orders-streaming  | 2024-04-18 03:06:08,828 ERROR [o.a.s.c.s.SeaTunnel       
    ] [main] - Fatal Error, 
   orders-streaming  | 
   orders-streaming  | 2024-04-18 03:06:08,828 ERROR [o.a.s.c.s.SeaTunnel       
    ] [main] - Please submit bug report in 
https://github.com/apache/seatunnel/issues
   orders-streaming  | 
   orders-streaming  | 2024-04-18 03:06:08,828 ERROR [o.a.s.c.s.SeaTunnel       
    ] [main] - Reason:SeaTunnel job executed failed 
   orders-streaming  | 
   orders-streaming  | 2024-04-18 03:06:08,830 ERROR [o.a.s.c.s.SeaTunnel       
    ] [main] - Exception 
StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: 
SeaTunnel job executed failed
   orders-streaming  |     at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:199)
   orders-streaming  |     at 
org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
   orders-streaming  |     at 
org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
   orders-streaming  | Caused by: 
org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: 
org.apache.seatunnel.connectors.seatunnel.cdc.mongodb.exception.MongodbConnectorException:
 ErrorCode:[COMMON-07], ErrorDescription:[Unsupported data type] - Unable to 
convert to integer from unexpected value 'BsonDouble{value=259080.00000000003}' 
of type DOUBLE
   ```
   
   
   ### Zeta or 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: [email protected]

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

Reply via email to