Skip to content

Commit 074ec1e

Browse files
adapt tests to work for earlier dbt versions
1 parent 3a2bd32 commit 074ec1e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/dbt/test_manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def test_source_meta_external_location():
232232
expected = (
233233
"read_parquet('path/to/external/items.parquet')"
234234
if DBT_VERSION >= (1, 4, 0)
235-
else '"main"."parquet_file".items'
235+
else '"memory"."parquet_file".items'
236236
)
237237
assert relation.render() == expected
238238

tests/fixtures/dbt/sushi_test/macros/materializations/custom_incremental.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
{%- if existing_relation is none -%}
2525
{# The first insert creates new table if it doesn't exist #}
2626
{%- call statement('main') -%}
27-
{{ create_table_as(False, new_relation, sql) }}
27+
CREATE TABLE {{ new_relation }}
28+
AS {{ sql }}
2829
{%- endcall -%}
2930
{%- else -%}
3031
{# Incremental load, appending new data with optional time filtering #}
@@ -40,6 +41,8 @@
4041

4142
{%- call statement('create_temp') -%}
4243
{{ create_table_as(True, temp_relation, filtered_sql) }}
44+
CREATE TABLE {{ temp_relation }}
45+
AS {{ filtered_sql }}
4346
{%- endcall -%}
4447

4548
{%- call statement('insert') -%}

0 commit comments

Comments
 (0)