Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1743,14 +1743,6 @@ def _prepare_query_configuration(
f" Please only use one or more of the following options: {allowed_schema_update_options}"
)

if schema_update_options:
if write_disposition not in ["WRITE_APPEND", "WRITE_TRUNCATE"]:
raise ValueError(
"schema_update_options is only "
"allowed if write_disposition is "
"'WRITE_APPEND' or 'WRITE_TRUNCATE'."
)

if destination_dataset_table:
destination_project, destination_dataset, destination_table = self.hook.split_tablename(
table_input=destination_dataset_table, default_project_id=self.project_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,6 @@ def _use_existing_table(self):
self.configuration["load"]["schema"] = {"fields": self.schema_fields}

if self.schema_update_options:
if self.write_disposition not in ["WRITE_APPEND", "WRITE_TRUNCATE"]:
raise ValueError(
"schema_update_options is only "
"allowed if write_disposition is "
"'WRITE_APPEND' or 'WRITE_TRUNCATE'."
)
# To provide backward compatibility
self.schema_update_options = list(self.schema_update_options or [])
self.log.info("Adding experimental 'schemaUpdateOptions': %s", self.schema_update_options)
Expand Down
Loading