Skip to content

Commit

Permalink
(Documentation) Included notes on resolving compilation error while i…
Browse files Browse the repository at this point in the history
…nitializing dq-tools (#41)

* Add note to disable timespine model in dq_tool if there is a compilation error

* Add note to disable model when there is a compilation error
  • Loading branch information
jingyu-infinitelambda authored Nov 15, 2024
1 parent fd6ef5f commit 5dc60db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ Since the version 1.3, the table `dq_issue_log` is made as dbt model, no more ma

It should be created automatically within your upstream dbt command. If not, all you should do that is running the command: `dbt run -s dq_tools`.

> [!NOTE]
> If you already have a `metricflow_time_spine` model in your project, you will encounter a Compilation error when executing `dbt run -s dq_tools`. In this scenario, disable the `metricflow_time_spine` model by updating its configuration in your project (path: your_project/dbt_packages/dq_tools/models/04_metric/metricflow_time_spine).


<details>
<summary>For dq-tools legacy version >=1.0,<1.3</summary>

Expand Down
5 changes: 5 additions & 0 deletions models/04_metric/metricflow_time_spine.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
)
}}

{#-
if you encounter a compilation error due to duplicated metricflow_time_spine node,
add enabled=false in the config block above
-#}

--Check https://docs.getdbt.com/docs/build/metricflow-time-spine
{% set start_date = var("dbt_dq_tool_start_date", "to_date('01/01/2000','mm/dd/yyyy')") -%}
{% set end_date = var("dbt_dq_tool_end_date", "to_date('01/01/2030','mm/dd/yyyy')") -%}
Expand Down

0 comments on commit 5dc60db

Please sign in to comment.