Skip to content

Commit

Permalink
Fix generated dbt project
Browse files Browse the repository at this point in the history
  - 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.
  • Loading branch information
mildbyte committed Dec 30, 2021
1 parent 9c773ed commit 85ae2c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion splitgraph/cloud/project/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# Here as a starting point. You can reference these models downstream in models that actually
# materialize as tables.
staging:
+materialized: cte
+materialized: ephemeral
"""

SOURCES_YML_TEMPLATE = """# This file defines all data sources referenced by this model. The mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ models:
# Here as a starting point. You can reference these models downstream in models that actually
# materialize as tables.
staging:
+materialized: cte
+materialized: ephemeral
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ models:
# Here as a starting point. You can reference these models downstream in models that actually
# materialize as tables.
staging:
+materialized: cte
+materialized: ephemeral

0 comments on commit 85ae2c7

Please sign in to comment.