-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from jwills/jwills_more_incremental_tests
Updates to support a broader class of incremental functionality
- Loading branch information
Showing
4 changed files
with
40 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% macro duckdb__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %} | ||
|
||
{% if add_columns %} | ||
{% for column in add_columns %} | ||
{% set sql -%} | ||
alter {{ relation.type }} {{ relation }} add column | ||
{{ column.name }} {{ column.data_type }} | ||
{%- endset -%} | ||
{% do run_query(sql) %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if remove_columns %} | ||
{% for column in remove_columns %} | ||
{% set sql -%} | ||
alter {{ relation.type }} {{ relation }} drop column | ||
{{ column.name }} | ||
{%- endset -%} | ||
{% do run_query(sql) %} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
from dbt.tests.adapter.incremental.test_incremental_unique_id import ( | ||
BaseIncrementalUniqueKey, | ||
) | ||
from dbt.tests.adapter.incremental.test_incremental_predicates import ( | ||
BaseIncrementalPredicates, | ||
) | ||
from dbt.tests.adapter.incremental.test_incremental_on_schema_change import ( | ||
BaseIncrementalOnSchemaChange, | ||
) | ||
|
||
|
||
class TestIncrementalUniqueKey(BaseIncrementalUniqueKey): | ||
pass | ||
|
||
|
||
class TestIncrementalPredicates(BaseIncrementalPredicates): | ||
pass | ||
|
||
|
||
class TestBaseIncrementalUniqueKey(BaseIncrementalUniqueKey): | ||
class TestIncrementalOnSchemaChange(BaseIncrementalOnSchemaChange): | ||
pass |