diff --git a/dlt/destinations/impl/dremio/dremio.py b/dlt/destinations/impl/dremio/dremio.py index 8aaa673083..5eaacaeb35 100644 --- a/dlt/destinations/impl/dremio/dremio.py +++ b/dlt/destinations/impl/dremio/dremio.py @@ -228,3 +228,8 @@ def _null_to_bool(v: str) -> bool: def _create_merge_followup_jobs(self, table_chain: Sequence[TTableSchema]) -> List[NewLoadJob]: return [DremioMergeJob.from_table_chain(table_chain, self.sql_client)] + + def _make_add_column_sql( + self, new_columns: Sequence[TColumnSchema], table_format: TTableFormat = None + ) -> List[str]: + return ["ADD COLUMNS (" + ", ".join(self._get_column_def_sql(c) for c in new_columns) + ")"] diff --git a/tests/load/pipeline/test_write_disposition_changes.py b/tests/load/pipeline/test_write_disposition_changes.py index 6d015b9ad8..24ff806922 100644 --- a/tests/load/pipeline/test_write_disposition_changes.py +++ b/tests/load/pipeline/test_write_disposition_changes.py @@ -129,11 +129,13 @@ def source(): # doing this will result in somewhat useless behavior destination_allows_adding_root_key = destination_config.destination == "dremio" + if destination_allows_adding_root_key and not with_root_key: + return + # without a root key this will fail, it is expected if ( not with_root_key and destination_config.supports_merge - and not destination_allows_adding_root_key ): with pytest.raises(PipelineStepFailed): pipeline.run( @@ -157,7 +159,7 @@ def source(): "items": 100 if destination_config.supports_merge else 200, "items__sub_items": ( 100 - if (destination_config.supports_merge and not destination_allows_adding_root_key) + if destination_config.supports_merge else 200 ), },