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

Add labels to BQ uploaded tables #131

Merged

Conversation

thedae
Copy link
Contributor

@thedae thedae commented Mar 13, 2024

Proposed Changes

Adding a raster_loader label to BQ tables containing the current package version

Pull Request Checklist

  • I have tested the changes locally
  • I have added tests to cover my changes (if applicable)

@thedae thedae requested review from volaya and Jesus89 March 13, 2024 11:45
Copy link

This pull request has been linked to Shortcut Story #394522: Modify raster-loader to add labels to BQ uploads.

@thedae thedae marked this pull request as ready for review March 13, 2024 12:38
@@ -161,6 +163,9 @@ def done_callback(job):
print("Writing metadata to BigQuery...")
self.write_metadata(metadata, append_records, fqn)

print("Updating labels...")
self.update_labels(fqn, {"raster_loader": re.sub(r'[^a-z0-9_-]', '_', __version__.lower())})
Copy link
Member

Choose a reason for hiding this comment

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

You can wrap this in a function and add a unit test for the function, to ensure any future changes do not break the integration with the raster tables in the platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

Copy link
Contributor

@volaya volaya left a comment

Choose a reason for hiding this comment

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

LGTM

@thedae thedae requested a review from Jesus89 March 13, 2024 13:52
@thedae thedae merged commit cd67c05 into main Mar 13, 2024
4 checks passed
@thedae thedae deleted the feature/sc-394522/modify-raster-loader-to-add-labels-to-bq branch March 13, 2024 14:20
@Jesus89 Jesus89 mentioned this pull request Mar 25, 2024
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