Skip to content

Commit

Permalink
TestSparkUnitTestCaseInsensitivity, TestSparkUnitTestInvalidInput
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Feb 7, 2024
1 parent e62b73d commit e67a397
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbt/include/spark/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
{%- macro spark__create_table_as(temporary, relation, compiled_code, language='sql') -%}
{%- if language == 'sql' -%}
{%- if temporary -%}
{#-- for SQL model we will create temp view that doesn't have database and schema --#}
{%- if language == 'sql'-%}
{%- set relation = relation.include(database=false, schema=false) -%}
{%- endif -%}
{{ create_temporary_view(relation, compiled_code) }}
{%- else -%}
{% if config.get('file_format', validator=validation.any[basestring]) in ['delta', 'iceberg'] %}
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

0 comments on commit e67a397

Please sign in to comment.