-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
archives: do not create existing schema (#758) #1398
archives: do not create existing schema (#758) #1398
Conversation
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, but one question worth discussing
@@ -84,6 +85,11 @@ def list_schemas(self, database): | |||
include_all=True) | |||
return [ds.dataset_id for ds in all_datasets] | |||
|
|||
@available |
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.
does this mean that we'll need to do something similar for the Presto and Spark plugins?
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.
This @available
exists to make the relation available to bq's macros so it can implement this macro, because on bigquery that functionality is implemented via the connection.
Spark is a SQLAdapter
and so it already has the macro available. Though it does look like it's incomplete?
We currently don't support archives on presto, so we don't have to worry about that at all.
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.
hah, dang. Ok, thanks for the info, we can handle Spark separately from this for sure
b00c824
to
416cc72
Compare
7a4dae4
to
cc4f285
Compare
No changes, just a rebase onto the other PR! |
Fixes #758
This is based on #1361
During archive creation, check if a schema exists before creating it.
We should probably cache the results of
list_schemas
orcheck_schema_exists
.