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

fix(ingest): Glue mapping patch #2930

Merged

Conversation

aseembansal-gogo
Copy link
Contributor

@aseembansal-gogo aseembansal-gogo commented Jul 22, 2021

Without this fix was getting errors due to varchar(x) and decimal(x, y) types in our glue catalog

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)

@aseembansal-gogo aseembansal-gogo changed the title Glue mapping patch fix(ingest): Glue mapping patch Jul 22, 2021
Copy link
Contributor

@kevinhu kevinhu left a comment

Choose a reason for hiding this comment

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

Thanks for this patch!

"decimal": NumberTypeClass,
}

type_class = None
if field_type in field_type_mapping.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: if you want to check if a key is in a dict, there's no need for .keys() – see https://stackoverflow.com/questions/1602934/check-if-a-given-key-already-exists-in-a-dictionary

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.

Other than the nit from Kevin, this LGTM!

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!

@shirshanka shirshanka merged commit 4e0da7c into datahub-project:master Jul 22, 2021
@aseembansal-gogo aseembansal-gogo deleted the glue-mapping-patch branch July 23, 2021 04:17
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.

4 participants