-
Notifications
You must be signed in to change notification settings - Fork 182
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
Feat/1711 create with not exists dlt tables #1740
Conversation
✅ Deploy Preview for dlt-hub-docs canceled.
|
0c19c0a
to
7f1f76f
Compare
@@ -76,6 +76,7 @@ class DestinationCapabilitiesContext(ContainerInjectableContext): | |||
# use naming convention in the schema | |||
naming_convention: TNamingConventionReferenceArg = None | |||
alter_add_multi_column: bool = True | |||
create_table_not_exists: bool = True |
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.
I suggest to rename it that it's clear it for _dlt
tables:
For ex, create_dlt_table_if_not_exists
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 is in destination caps. but I will rename it to make clear what it means
bcdd8c8
to
40b9943
Compare
* uses normalized column names when linking tables in relational * destination cap if create table if not exits supported * generates IF NOT EXISTS for dlt tables * adds logging for terminal and retry exception in run_managed of load job * passes schema update to be collected in trace in filesystem * fixes job log exception message
* uses normalized column names when linking tables in relational * destination cap if create table if not exits supported * generates IF NOT EXISTS for dlt tables * adds logging for terminal and retry exception in run_managed of load job * passes schema update to be collected in trace in filesystem * fixes job log exception message
* uses normalized column names when linking tables in relational * destination cap if create table if not exits supported * generates IF NOT EXISTS for dlt tables * adds logging for terminal and retry exception in run_managed of load job * passes schema update to be collected in trace in filesystem * fixes job log exception message
Description
fixes #1711
NOTE: this will prevent race conditions only if CREATE TABLE IF NOT EXISTS is atomic. ie. on postgres it is not if table contains partitions: https://stackoverflow.com/questions/77486178/how-to-prevent-create-table-if-not-exists-fail-with-duplicate-table
still the chances of a race are way smaller
also fixes two minor issues, see commit list below