-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mongodb): implement data filter for mongodb source #529
Conversation
6122c6a
to
84a4400
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no exception or warning raised when $lte < $gte for example:
movies = mongodb_collection(
collection="movies",
incremental=dlt.sources.incremental(
"released",
initial_value="1917-01-01T00:00:00Z"
),
filter_={
"released": {
"$lte": "1800-06-01T00:00:00Z"
}
}
)
Is this something we want to test or leave as is?
Otherwise LGTM
movies = mongodb_collection( | ||
collection="movies", | ||
incremental=dlt.sources.incremental("runtime", initial_value=20), | ||
filter_={"runtime": {"$gte": 20}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be worth adding tests for when $lts < $gte filter for the same field or thinking about whether we should handle this in some way?
@Pipboyguy thanks for checking this out! I think we should let people to put any condition they want even if that makes sense. we do the same with sql alchemy AFAIK |
* feat(mongodb): implement data filter for mongodb source
Closes #521