Skip to content
This repository was archived by the owner on May 27, 2020. It is now read-only.

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

Open
DeeeFOX opened this issue Sep 30, 2016 · 0 comments
Open

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

DeeeFOX opened this issue Sep 30, 2016 · 0 comments

Comments

@DeeeFOX
Copy link

DeeeFOX commented Sep 30, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant