Skip to content

Commit

Permalink
Apply new integration tests to existing framework to identify support…
Browse files Browse the repository at this point in the history
…ed features (#691)

* Implement integration test framework from core for dynamic tables
* Fix `target_lag` input parameter
* Identify working features and non-working features, skipped non-working feature tests
  • Loading branch information
mikealfare authored Jul 17, 2023
1 parent 641745f commit b698480
Show file tree
Hide file tree
Showing 9 changed files with 551 additions and 272 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20230714-224033.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Enumerate supported features for dynamic tables in 1.6.0rc1
time: 2023-07-14T22:40:33.694348-04:00
custom:
Author: mikealfare
Issue: dbt-labs/dbt-core#6911
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dev: ## Installs adapter in develop mode along with development dependencies
dev-uninstall: ## Uninstalls all packages while maintaining the virtual environment
## Useful when updating versions, or if you accidentally installed into the system interpreter
pip freeze | grep -v "^-e" | cut -d "@" -f1 | xargs pip uninstall -y
pip uninstall -y dbt-snowflake

.PHONY: mypy
mypy: ## Runs mypy against staged changes for static type checking.
Expand Down
1 change: 1 addition & 0 deletions dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class SnowflakeConfig(AdapterConfig):
query_tag: Optional[str] = None
tmp_relation_type: Optional[str] = None
merge_update_columns: Optional[str] = None
target_lag: Optional[str] = None


class SnowflakeAdapter(SQLAdapter):
Expand Down
32 changes: 32 additions & 0 deletions tests/functional/adapter/dynamic_table_tests/files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
MY_SEED = """
id,value
1,100
2,200
3,300
""".strip()


MY_TABLE = """
{{ config(
materialized='table',
) }}
select * from {{ ref('my_seed') }}
"""


MY_VIEW = """
{{ config(
materialized='view',
) }}
select * from {{ ref('my_seed') }}
"""


MY_DYNAMIC_TABLE = """
{{ config(
materialized='dynamic_table',
warehouse='DBT_TESTING',
target_lag='60 seconds',
) }}
select * from {{ ref('my_seed') }}
"""
59 changes: 0 additions & 59 deletions tests/functional/adapter/dynamic_table_tests/fixtures.py

This file was deleted.

213 changes: 0 additions & 213 deletions tests/functional/adapter/dynamic_table_tests/test_dynamic_table.py

This file was deleted.

Loading

0 comments on commit b698480

Please sign in to comment.