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
🐛 Destination Bigquery - ensure raw dataset created with migration #29522
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -604,11 +604,16 @@ private String wrapAndQuote(final String namespace, final String tableName) { | |
@Override | ||
public String migrateFromV1toV2(final StreamId streamId, final String namespace, final String tableName) { | ||
return new StringSubstitutor(Map.of( | ||
"raw_namespace", StringUtils.wrap(streamId.rawNamespace(), QUOTE), | ||
"dataset_location", datasetLocation, | ||
"v2_raw_table", streamId.rawTableId(QUOTE), | ||
"v1_raw_table", wrapAndQuote(namespace, tableName) | ||
) | ||
).replace( | ||
""" | ||
""" | ||
CREATE SCHEMA IF NOT EXISTS ${raw_namespace} | ||
OPTIONS(location="${dataset_location}"); | ||
|
||
CREATE OR REPLACE TABLE ${v2_raw_table} ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this table create statement also need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fairly confident that bigquery doesn't let you create tables in a different location than the dataset |
||
_airbyte_raw_id STRING, | ||
_airbyte_data JSON, | ||
|
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.
✅