Skip to content
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(ingestion/mongodb) re-order aggregation logic #12428

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Haebuk
Copy link

@Haebuk Haebuk commented Jan 22, 2025

I fix the linked issue by reordering aggregation logics.
It would be sampling first then measuring doc size and filtering so much faster.

Checklist

Remove an unnecessary comma in the MongoDB aggregation logic to ensure consistency in the code style.
This change does not affect functionality but improves code readability.
Refactor the MongoDB document aggregation process by consolidating the aggregation call into a single location, regardless of the sample size condition. This change enhances code clarity and maintains functionality.
Refactor the MongoDB document aggregation logic to streamline the handling of sampling conditions. The changes ensure that the aggregation process is clearer by consolidating the logic for random sampling and limiting sample size into a more cohesive structure, enhancing code readability while maintaining existing functionality.
Reorganize the logic for adding a document size filter in the MongoDB aggregation process. The changed aggregation order improves MongoDB scanning performance.
@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
...-ingestion/src/datahub/ingestion/source/mongodb.py 91.01% <100.00%> (+1.56%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5309ae0...ccbfb92. Read the comment docs.

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jan 22, 2025
@Haebuk Haebuk changed the title Feature/source mongodb aggregation logic feat(ingestion/mongodb) re-order aggregation logic Jan 23, 2025
…ndom sampling

- Introduced a new golden JSON file for MongoDB ingestion without random sampling.
- Updated the test suite to include a pipeline that verifies the ingestion process.
- Ensured the output is validated against the new golden file to maintain data integrity.

This commit enhances the testing framework for MongoDB ingestion, ensuring that the functionality works as expected without random sampling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata needs-review Label for PRs that need review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants