Skip to content

Commit 85ae2c7

Browse files
committed
Fix generated dbt project
- use "ephemeral" instead of cte for materialization The sample job in the suite at https://github.com/mildbyte/template-test-2/runs/4667663552?check_suite_focus=true now actually completes (but doesn't do anything) because it just makes an unchecked CTE (the source tables don't exist). Fails as expected (https://github.com/mildbyte/template-test-2/runs/4667687824?check_suite_focus=true) if we materialize as tables since then the relation indeed doesn't exist.
1 parent 9c773ed commit 85ae2c7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

  • splitgraph/cloud/project
  • test/splitgraph/cloud/project/snapshots
    • test_dbt/test_generate_dbt_project/splitgraph_template
    • test_generation/test_generate_project_with_dbt/generate_project_dbt

splitgraph/cloud/project/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
# Here as a starting point. You can reference these models downstream in models that actually
6868
# materialize as tables.
6969
staging:
70-
+materialized: cte
70+
+materialized: ephemeral
7171
"""
7272

7373
SOURCES_YML_TEMPLATE = """# This file defines all data sources referenced by this model. The mapping

test/splitgraph/cloud/project/snapshots/test_dbt/test_generate_dbt_project/splitgraph_template/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ models:
3030
# Here as a starting point. You can reference these models downstream in models that actually
3131
# materialize as tables.
3232
staging:
33-
+materialized: cte
33+
+materialized: ephemeral

test/splitgraph/cloud/project/snapshots/test_generation/test_generate_project_with_dbt/generate_project_dbt/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ models:
3030
# Here as a starting point. You can reference these models downstream in models that actually
3131
# materialize as tables.
3232
staging:
33-
+materialized: cte
33+
+materialized: ephemeral

0 commit comments

Comments
 (0)