[Kafka Connect]How to use $match to express field equal to Mongo's ObjectId in pipeline

Hello, when i use MongoDB Kafka Connector, link https://docs.mongodb.com/kafka-connector/master/kafka-source/

I want to use pipeline config.
However, how should i expresess $match and ObjectId in config file.

What i need is this:

db.collection.aggregate([{"$match": {bid: ObjectId("591480926fb3a6a6d5c5174b")}}])

Hi @Yanjie_Wang,

Try to use the extended json representation :

 "bid": {
      "$oid": "591480926fb3a6a6d5c5174b"
    }

Let me know if that works for you.

Best regards
Pavel