-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add labels to BQ uploaded tables #131
Conversation
This pull request has been linked to Shortcut Story #394522: Modify raster-loader to add labels to BQ uploads. |
raster_loader/io/bigquery.py
Outdated
@@ -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())}) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed Changes
Adding a
raster_loader
label to BQ tables containing the current package versionPull Request Checklist