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(ingest/mongodb): support stateful ingestion #9118

Merged

Conversation

TonyOuyangGit
Copy link
Contributor

This PR improves the MongoDB ingestion source by adding stateful ingestion and platform instance support and also refactors the existing code to emit MetadataChangeProposal instead of MetadataChangeEvent which is the current standard way of emitting events.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Oct 26, 2023
@TonyOuyangGit TonyOuyangGit changed the title mongodb improvement feat(mongodb): Improve MongoDB ingestion source to support platform_instance and stateful ingestion Oct 26, 2023
@TonyOuyangGit TonyOuyangGit marked this pull request as ready for review October 27, 2023 00:26
@@ -90,6 +103,10 @@ class MongoDBConfig(PlatformInstanceConfigMixin, EnvConfigMixin):
# mongodb only supports 16MB as max size for documents. However, if we try to retrieve a larger document it
# errors out with "16793600" as the maximum size supported.
maxDocumentSize: Optional[PositiveInt] = Field(default=16793600, description="")
ingest_data_platform_instance_aspect: Optional[bool] = Field(
default=False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably want this to be default true, or at least done automatically if platform_instance is set. don't think it makes sense to make it a config option

metadata-ingestion/src/datahub/ingestion/source/mongodb.py Outdated Show resolved Hide resolved
@hsheth2
Copy link
Collaborator

hsheth2 commented Oct 27, 2023

@TonyOuyangGit one thing - platform_instance support was already added in 8522679 - it looks like this is just doing some refactoring which is great, but I'm going to tweak the PR title accordingly

@hsheth2 hsheth2 changed the title feat(mongodb): Improve MongoDB ingestion source to support platform_instance and stateful ingestion feat(ingest/mongodb): support stateful ingestion Oct 27, 2023
@hsheth2
Copy link
Collaborator

hsheth2 commented Oct 30, 2023

@TonyOuyangGit looks like the mongodb tests need to be updated

@TonyOuyangGit
Copy link
Contributor Author

TonyOuyangGit commented Oct 30, 2023

@hsheth2 Thank you! Since I refactored to use MetadataChangeProposal to emit datasets, I think I'll need to update the golden file to reflect the changes.
Seems there's one outstanding test failure now which is clickhouse ingestion, shouldn't relate

@hsheth2 hsheth2 added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label Oct 31, 2023
@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 31, 2023
@anshbansal anshbansal merged commit 876de21 into datahub-project:master Nov 1, 2023
51 checks passed
@TonyOuyangGit TonyOuyangGit deleted the feat-improve-mongodb branch November 1, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ ingestion PR or Issue related to the ingestion of metadata merge-pending-ci A PR that has passed review and should be merged once CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants