-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
🐛 Source Mongo Internal POC: Use sampling for schema discovery #29607
Conversation
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
source-mongodb-internal-poc test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-mongodb-internal-poc/metadata.yaml | ❌ |
Connector version semver check | ✅ |
Connector version increment check | ❌ |
QA checks | ❌ |
Build connector tar | ✅ |
Build source-mongodb-internal-poc docker image for platform linux/x86_64 | ✅ |
./gradlew :airbyte-integrations:connectors:source-mongodb-internal-poc:integrationTest | ❌ |
Acceptance tests | ❌ |
☁️ View runs for commit in Dagger Cloud
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-mongodb-internal-poc test
@@ -121,8 +119,7 @@ private static Set<Field> getFieldsInCollection(final MongoCollection collection | |||
groupMap.put("fields", Map.of("$addToSet", "$fields")); | |||
|
|||
final List<Bson> aggregateList = new ArrayList<>(); | |||
aggregateList.add(Aggregates.limit(DISCOVERY_LIMIT)); | |||
sortField.ifPresent(s -> aggregateList.add(Aggregates.sort(new Document(s, -1)))); | |||
aggregateList.add(Aggregates.sample(DISCOVERY_SAMPLE_SIZE)); |
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.
nice!
/approve-and-merge reason="mongodb source poc" |
What
How
$sample
instead of$limit
in document aggregation pipelineRecommended reading order
MongoUtil.java