-
Notifications
You must be signed in to change notification settings - Fork 4.5k
🎉 New source: MongoDb ported to java #5530
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
Conversation
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.
Please also make sure you have added all docs as per the checklist.
Connector's README.md
docs/SUMMARY.md
docs/integrations/
docs/integrations/README.md
airbyte-integrations/builds.md
airbyte-integrations/connectors/source-mongodb-new/CHANGELOG.md
Outdated
Show resolved
Hide resolved
/test connector=connectors/source-mongodb-new
|
implementation project(':airbyte-protocol:models') | ||
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs) | ||
implementation project(':airbyte-integrations:connectors:source-relational-db') | ||
implementation group: 'org.mongodb', name: 'mongo-java-driver', version: '3.12.8' |
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.
Do we really need the driver here? Is there something outside airbyte-db
and MongodbDatabase
?
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.
Yes, there is MongoCollection, BsonType and Document classes from mongo
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.
Looks great!
One minor issue about the name. source-mongodb-new
seems informal. Can it be renamed to something like source-mongodb-v2
?
@sherifnada, FYI.
...o/airbyte/integrations/io/airbyte/integration_tests/sources/MongoDbSourceAcceptanceTest.java
Outdated
Show resolved
Hide resolved
@@ -458,3 +458,9 @@ | |||
dockerRepository: airbyte/source-amazon-ads | |||
dockerImageTag: 0.1.0 | |||
documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-ads | |||
- sourceDefinitionId: b2e713cd-cc36-4c0a-b5bd-b47cb8a0561e |
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.
lets remove the old mongo db implementation, having two implementations is confusing to the user
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.
I removed old implementation from source definitions.
airbyte-integrations/builds.md
Outdated
@@ -49,6 +49,7 @@ | |||
| Microsoft Teams | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-microsoft-teams) | | |||
| Mixpanel | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-mixpanel) | | |||
| Mongo DB | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-mongodb) | | |||
| Mongo DB new | [](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/source-mongodb-new) | |
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.
Externally, this should just be called Mongo DB
and should replace the existing mongo implementation.
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.
Removed old | Mongo DB |
and renamed a new one to | Mongo DB |
accordingly
"examples": ["admin"], | ||
"order": 5 | ||
}, | ||
"replica_set": { |
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.
can this connect to both a replica set and a single node mongo db?
Can you test it using the mongodb atlas credentials in lastpass?
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.
Sure, working on it
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.
@sherifnada I've updated spec.json and connection param to connect to Mongodb Atlas as it uses mongodb+srv
protocol.
So now it is possible to connect to Standalone MongoDb instance, Replica Set and MongoDb Atlas Cluster as well.
I've tested it using the mongodb atlas credentials, works good.
docs/integrations/README.md
Outdated
@@ -65,6 +65,7 @@ Airbyte uses a grading system for connectors to help users understand what to ex | |||
|[Microsoft Teams](./sources/microsoft-teams.md)| Certified | | |||
|[Mixpanel](./sources/mixpanel.md)| Beta | | |||
|[Mongo DB](./sources/mongodb.md)| Alpha | | |||
|[Mongo DB new](./sources/mongodb-new.md)| Alpha | |
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 should be only one mongo db, also it should be in beta
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.
Done
… connector info in all docs
… connector info in all docs
…nto irynakruk/3428-mongodb-source
/test connector=connectors/source-postgres
|
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!
/test connector=connectors/source-bigquery
|
/test connector=connectors/source-mongodb-v2
|
/publish connector=connectors/source-mongodb-v2
|
What
Port MongoDB Source to Java
How
Implemented with mongodb native java driver.
Added abstraction
AbstractDbSource
uponAbstractRelationalDbSource
, so now all non jdbc and non sql sources can depend on it.Recommended reading order
MongoDbSource.java
MongoDatabase.java
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
docs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described here