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

   ### 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
   
   MongoDB plugin match.query can't work with $gte. " JSON reader was expecting 
a value but found '$'."
   
   ### SeaTunnel Version
   
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     MongoDB {
       result_table_name = "fake"
       uri = "mongodb+srv://demo:[email protected]/mg_dynamic_601"
       database = "mg_dynamic_601"
       collection = "demo"
       schema = {
         fields {
           _id: string,
           age:string,
           like:string,
           uptime:bigint
         }
       }
       match.query = "{uptime:{'$gte':${begin}}}"
     }
   }
   
   transform {
     
   }
   
   sink {
     Console {
       source_table_name = "fake"
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   bash bin/start-seatunnel-flink-13-connector-v2.sh  -n deme2  -i begin=101 -c 
./job/demo2.conf
   ```
   
   
   ### Error Exception
   
   ```log
   Execute SeaTunnel Flink Job: ${FLINK_HOME}/bin/flink run -c 
org.apache.seatunnel.core.starter.flink.SeaTunnelFlink 
/home/sean/apache-seatunnel-2.3.3/starter/seatunnel-flink-13-starter.jar 
--config ./job/demo2.conf --name deme2 -Dbegin=101
   
   ------------------------------------------------------------
    The program finished with the following exception:
   
   org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error: JSON reader was expecting a value but found '$'.
           at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:366)
           at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:219)
           at 
org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
           at 
org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812)
           at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246)
           at 
org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054)
           at 
org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132)
           at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
           at 
org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132)
   Caused by: org.bson.json.JsonParseException: JSON reader was expecting a 
value but found '$'.
           at org.bson.json.JsonReader.readBsonType(JsonReader.java:263)
           at 
org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:85)
           at 
org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:42)
           at 
org.bson.codecs.BsonDocumentCodec.readValue(BsonDocumentCodec.java:104)
           at 
org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:87)
           at org.bson.BsonDocument.parse(BsonDocument.java:66)
           at 
org.apache.seatunnel.connectors.seatunnel.mongodb.source.MongodbSource.prepare(MongodbSource.java:113)
           at 
org.apache.seatunnel.core.starter.flink.execution.SourceExecuteProcessor.initializePlugins(SourceExecuteProcessor.java:134)
           at 
org.apache.seatunnel.core.starter.flink.execution.FlinkAbstractPluginExecuteProcessor.<init>(FlinkAbstractPluginExecuteProcessor.java:67)
           at 
org.apache.seatunnel.core.starter.flink.execution.SourceExecuteProcessor.<init>(SourceExecuteProcessor.java:58)
           at 
org.apache.seatunnel.core.starter.flink.execution.FlinkExecution.<init>(FlinkExecution.java:87)
           at 
org.apache.seatunnel.core.starter.flink.command.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:59)
           at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
           at 
org.apache.seatunnel.core.starter.flink.SeaTunnelFlink.main(SeaTunnelFlink.java:34)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:349)
           ... 8 more
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   flink 1.12.4
   
   ### Java or Scala Version
   
   openjdk version "1.8.0_392"
   OpenJDK Runtime Environment (Temurin)(build 1.8.0_392-b08)
   OpenJDK 64-Bit Server VM (Temurin)(build 25.392-b08, mixed mode)
   
   ### 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