Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cr/test unit testing #978

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dbt/include/spark/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

{#-- We can't use temporary tables with `create ... as ()` syntax --#}
{% macro spark__create_temporary_view(relation, compiled_code) -%}
create or replace temporary view {{ relation }} as
create or replace temporary view {{ relation.identifier }} as
{{ compiled_code }}
{%- endmacro -%}

Expand Down Expand Up @@ -386,7 +386,7 @@
{% set tmp_relation = base_relation.incorporate(path = {
"identifier": tmp_identifier
}) -%}

{%- set tmp_relation = tmp_relation.include(database=false, schema=false) -%}
{% do return(tmp_relation) %}
{% endmacro %}

Expand Down
4 changes: 3 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# install latest changes in dbt-core
# TODO: how to automate switching from develop to version branches?
git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter
git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-adapters.git@unit-testing-case-insensitive-comparisons
git+https://github.com/dbt-labs/dbt-adapters.git@unit-testing-case-insensitive-comparisons#subdirectory=dbt-tests-adapter

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
Expand Down
10 changes: 10 additions & 0 deletions tests/functional/adapter/unit_testing/test_unit_testing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from dbt.tests.adapter.unit_testing.test_case_insensitivity import BaseUnitTestCaseInsensivity
from dbt.tests.adapter.unit_testing.test_invalid_input import BaseUnitTestInvalidInput


class TestSparkUnitTestCaseInsensitivity(BaseUnitTestCaseInsensivity):
pass


class TestSparkUnitTestInvalidInput(BaseUnitTestInvalidInput):
pass
Loading