-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support table and incremental materialization. Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com> Co-authored-by: Drew Banin <drew@dbtlabs.com>
- Loading branch information
1 parent
2ceab48
commit c0b9274
Showing
9 changed files
with
182 additions
and
61 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
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
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
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,43 @@ | ||
import pytest | ||
from dbt.tests.util import run_dbt, write_file | ||
from dbt.tests.adapter.python_model.test_python_model import BasePythonModelTests, BasePythonIncrementalTests | ||
|
||
class TestPythonModelSnowflake(BasePythonModelTests): | ||
pass | ||
|
||
class TestIncrementalSnowflake(BasePythonIncrementalTests): | ||
pass | ||
|
||
models__simple_python_model = """ | ||
import pandas | ||
def model(dbt, session): | ||
dbt.config( | ||
materialized='table', | ||
) | ||
data = [[1,2]] * 10 | ||
return pandas.DataFrame(data, columns=['test', 'test2']) | ||
""" | ||
models__simple_python_model_v2 = """ | ||
import pandas | ||
def model(dbt, session): | ||
dbt.config( | ||
materialized='table', | ||
) | ||
data = [[1,2]] * 10 | ||
return pandas.DataFrame(data, columns=['test1', 'test3']) | ||
""" | ||
|
||
|
||
|
||
class TestChangingSchemaSnowflake: | ||
@pytest.fixture(scope="class") | ||
def models(self): | ||
return { | ||
"simple_python_model.py": models__simple_python_model | ||
} | ||
def test_changing_schema(self,project): | ||
run_dbt(["run"]) | ||
write_file(models__simple_python_model_v2, project.project_root + '/models', "simple_python_model.py") | ||
run_dbt(["run"]) |
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