Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
332 views
in Technique[技术] by (71.8m points)

DBT fails with not found in location when using a seed

I'm trying to build a dbt project with seed. Something very similar to this.

To create a temporary table, I use dbt seed and reference the table as given in the example in the link above.

I do some post processing of the raw csv file in data/ and call that sql file as processed_seed_file.sql in models/.

However, when I referencing it in a macro as part of another sql file in models/, it fails with the following error processed_seed_file was not found in location EU

the macro looks as follows

-- depends_on: {{ ref('processed_seed_file') }}

{{-
      config(
        materialized = 'ephemeral',
        verbose=True
    )
-}}

{%- call statement('start_statement', fetch_result=True) -%}
        SELECT DATE_SUB(MIN(start), INTERVAL CAST('{{ var("some_var") }}' as INT64) WEEK)
        FROM {{ ref('processed_seed_file') }}
{%- endcall -%}
{%- set start_date = load_result('start_statement')['data'][0][0] -%}

Any hints on where I might be going wrong?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...