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(restore): Fix restore backup jobs #3445

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

dexter-mh-lee
Copy link
Contributor

Error accessing systemmetadata column. Fixed typo.

Also changing it so it can take multiple backup files instead of just one.

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)

}

private EbeanAspectV2 convertRecord(GenericRecord record) {
return new EbeanAspectV2(record.get("urn").toString(), record.get("aspect").toString(),
(Long) record.get("version"), record.get("metadata").toString(),
Timestamp.from(Instant.ofEpochMilli((Long) record.get("createdon") / 1000)), record.get("createdby").toString(),
Optional.ofNullable(record.get("createdfor")).map(Object::toString).orElse(null),
record.get("systemMetadata").toString());
Optional.ofNullable(record.get("systemmetadata")).map(Object::toString).orElse(null));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming everything is lower cased in parquet? Overall 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 87d344f into datahub-project:master Oct 25, 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.

3 participants