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(cli/datacontract): Add data quality assertion support #8968

Merged
merged 12 commits into from
Oct 13, 2023

Conversation

asikowitz
Copy link
Collaborator

@asikowitz asikowitz commented Oct 6, 2023

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 6, 2023
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

broadly looks reasonable

@@ -54,7 +54,7 @@ class DataContract(ConfigModel):
freshness: Optional[FreshnessAssertion] = pydantic.Field(default=None)

# TODO: Add a validator to ensure that ids are unique
data_quality: Optional[List[DataQualityAssertion]] = None
data_quality: Optional[List[DataQualityAssertion]] = pydantic.Field(default=None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting - these two are equivalent right?

UpstreamClass,
UpstreamLineageClass,
)
from datahub.specific.dataset import DatasetPatchBuilder
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like the base commit isn't set correct?

@hsheth2
Copy link
Collaborator

hsheth2 commented Oct 11, 2023

@asikowitz btw we should probably write some tests for the contracts cli

@jjoyce0510
Copy link
Collaborator

What exactly is this contracts CLI going to be used for?

Can we provide some examples?

Also, we are moving quickly on new assertion types, how should we think about adding new types of assertions into contracts?

@@ -4,6 +4,8 @@
from typing_extensions import Literal

import datahub.emitter.mce_builder as builder
from datahub.api.entities.datacontract.assertion import BaseAssertion
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also support Volume Assertions + Freshness Assertions?

Or are these already supported

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Freshness is supported I believe, or at least a subset of it. Volume not yet

@asikowitz asikowitz merged commit 6bc7425 into datahub-project:master Oct 13, 2023
52 of 54 checks passed
@asikowitz asikowitz deleted the enhance-data-contract-cli branch October 13, 2023 16:36
@asikowitz
Copy link
Collaborator Author

@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 26, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants