Datavault-UK / automate-dv-demo

An example dbt project using AutomateDV to create a Data Vault 2.0 Data Warehouse based on the Snowflake TPC-H dataset.
https://www.automate-dv.com
Apache License 2.0
38 stars 35 forks source link

Macro error #16

Closed fithisux closed 5 months ago

fithisux commented 5 months ago

Hi, I try to port the demo to work with my TPC-H from a local duckdb installation (I do not have a snowflake account and I am not interested).

I have setup duckdb (like in my other dbt project).

But I get

No macro named 'get_escape_characters' found within namespace: 'automate_dv'

Can you help me?

fithisux commented 5 months ago

On a second note I see that duckdb does not have code generation. But I try to add this. And even though I have some additions for the macros

e.g.

{%- macro duckdb__cast_date(column_str, as_string=false, alias=none) -%}

    {%- if as_string -%}
    '{{ column_str }}'::date
    {%- else -%}
    cast({{ column_str }} as string)::date
    {%- endif -%}

    {%- if alias %} AS {{ alias }} {%- endif %}

{%- endmacro -%}

it still "prefers" the snowflake version.

How can I change this?

fithisux commented 5 months ago

https://github.com/Datavault-UK/automate-dv/issues/171