https://slingdata.io logo
Hello all, I am using sling in some
# sling-help
u
Hello all, I am using sling in some dagster workflow, so mostly in python. I have a legacy mongo cluster that I am trying to sync to s3. I have a working version in smaller blocks, so I know the connection is working. I am trying to add a filter on ObjectId (by date range since the original data doesn't have a proper date field. This is my equivalent mongoshell query
r.find({_id: {"$gte":ObjectId("68b4e2000000000000000000"),"$lt":ObjectId("68be1c800000000000000000")}})
. My problem is trying to pass the where clause into mongo through sling. Using $oid extended json does not work.
f
hey @.krogdor , have you tried using the
where
input? see https://docs.slingdata.io/connections/database-connections/mongodb#examples
u
Yeah, I have tested with som string fields, but the object id and the extended json syntax doesn’t seem to work.
f
OK next release will allow:
where: '{"_id": {"$gte": "67859d8ee682ab32317abc6f", "$lte": "67859d8ee682ab32317abcc8"}}'
u
Awesome, that is super cool.