diff --git a/dev-requirements.txt b/dev-requirements.txt index 96f252ebe..b6f142915 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,8 +1,8 @@ # install latest changes in dbt-core + dbt-postgres # TODO: how to switch from HEAD to x.y.latest branches after minor releases? -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=tests/adapter -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres +git+https://github.com/dbt-labs/dbt-core.git@8496/limit-in-show-query#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-core.git@8496/limit-in-show-query#egg=dbt-tests-adapter&subdirectory=tests/adapter +git+https://github.com/dbt-labs/dbt-core.git@8496/limit-in-show-query#egg=dbt-postgres&subdirectory=plugins/postgres # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor diff --git a/tests/functional/adapter/dbt_show/test_dbt_show.py b/tests/functional/adapter/dbt_show/test_dbt_show.py new file mode 100644 index 000000000..1ef474525 --- /dev/null +++ b/tests/functional/adapter/dbt_show/test_dbt_show.py @@ -0,0 +1,29 @@ +import pytest +from dbt.tests.adapter.dbt_show.test_dbt_show import BaseShowSqlHeader, BaseShowLimit + + +my_model_sql_header_sql = """ +{{ + config( + materialized = "table" + ) +}} +{% call set_sql_header(config) %} +CREATE TEMPORARY TABLE _variables AS ( + SELECT '89' as my_variable +); +{% endcall %} +SELECT my_variable from _variables +""" + + +class TestRedshiftShowLimit(BaseShowLimit): + pass + + +class TestRedshiftShowSqlHeader(BaseShowSqlHeader): + @pytest.fixture(scope="class") + def models(self): + return { + "sql_header.sql": my_model_sql_header_sql, + }