Stratio / Spark-MongoDB

Spark library for easy MongoDB access
http://www.stratio.com
Apache License 2.0
307 stars 96 forks source link

Can I give a filter term when loading data from mongodb #164

Open DeeeFOX opened 8 years ago

DeeeFOX commented 8 years ago

As title said, examples show me the code that loading a whole data set from the mongodb collection: job_ctx.read.format(source_format).options(host=mongo_url, database=db, collection=col).load()

But I don't need the whole set and what filter the data at mongodb side like the following job_ctx.read.format(source_format).options(host=mongo_url, database=db, collection=col).load('{ qty: { $ne: 20 }')

How can I do by Spark-MongoDB frame in Python