Skip to content

Commit

Permalink
Add logging, don't raise on first error
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Apr 5, 2023
1 parent 2543d5d commit 5f08d70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,22 @@

{%- set relations = {'relations': []} -%}

{%- if not state_relation -%}
-- nothing to do
{{ log("No relation found in state manifest for " ~ model.unique_id) }}
{{ return(relations) }}
{%- endif -%}

{%- set existing_relation = load_cached_relation(this) -%}
{%- set other_existing_relation = load_cached_relation(state_relation) -%}

{%- if existing_relation and not flags.FULL_REFRESH -%}
-- noop!
{{ log("Relation " ~ existing_relation ~ " already exists") }}
{{ return(relations) }}
{%- endif -%}

{%- set other_existing_relation = load_cached_relation(state_relation) -%}

-- If this is a database that can do zero-copy cloning of tables, and the other relation is a table, then this will be a table
-- Otherwise, this will be a view

Expand Down
2 changes: 1 addition & 1 deletion core/dbt/task/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def execute(self, model, manifest):

class CloneTask(GraphRunnableTask):
def raise_on_first_error(self):
return True
return False

def get_model_schemas(self, adapter, selected_uids: Iterable[str]) -> Set[BaseRelation]:
if self.manifest is None:
Expand Down

0 comments on commit 5f08d70

Please sign in to comment.