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): support for primary and foreign key extraction from sql sources #3316

Merged

Conversation

swaroopjagadish
Copy link
Contributor

Tested with mysql, sql server.
Should work for all sql systems.

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)

@@ -251,6 +258,12 @@ def get_schema_metadata(
nullable=column["nullable"],
recursive=False,
)
if (
pk_constraints is not None
and isinstance(pk_constraints, dict) # some dialects (hive) return list
Copy link
Contributor

Choose a reason for hiding this comment

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

nice catch

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM.
Looks like a previous PR didn't update the ingestion schemas.

@shirshanka shirshanka merged commit df0b4f2 into datahub-project:master Oct 1, 2021
xdl pushed a commit to G-Research/datahub that referenced this pull request Oct 4, 2021
xdl added a commit to G-Research/datahub that referenced this pull request Oct 5, 2021
jgiannuzzi pushed a commit to G-Research/datahub that referenced this pull request Oct 6, 2021
swaroopjagadish added a commit to swaroopjagadish/datahub that referenced this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants