遇到未知的标签'快照'在DBT快照中
I want to run a DBT Snapshot and am following a near-identical template to the one outlined in the
Compilation Error in model test_snapshot (.../project_folder/snapshots/test_snapshot.sql)
Encountered unknown tag 'snapshot'.
line 1
{% snapshot test_snapshot %}
这是我试图编译的代码。
{% snapshot test_snapshot %}
{{
config(
strategy='check',
unique_key='id',
target_schema='snapshots',
check_cols= 'all'
)
}}
select
*
from {{ ref('modle_in_sample_folder') }}
{% endsnapshot %}
快照文件夹和参考文件的顺序为.../project_folder/snapshots/test_snapshot.sql和.../project_folder/intermediate/model_in_in_sample_folder.sql
I want to run a DBT Snapshot and am following a near-identical template to the one outlined in the documentation. However, I get the error when I run dbt snpashot
Compilation Error in model test_snapshot (.../project_folder/snapshots/test_snapshot.sql)
Encountered unknown tag 'snapshot'.
line 1
{% snapshot test_snapshot %}
Below is the code I am attempting to compile.
{% snapshot test_snapshot %}
{{
config(
strategy='check',
unique_key='id',
target_schema='snapshots',
check_cols= 'all'
)
}}
select
*
from {{ ref('modle_in_sample_folder') }}
{% endsnapshot %}
The order of the snapshot folder and ref file is .../project_folder/snapshots/test_snapshot.sql and .../project_folder/intermediate/model_in_sample_folder.sql
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是我快照文件夹的位置。一旦我将其从型号项目文件夹中移出,并且在文件夹层次结构中最多可将其移出一个级别,那么我就可以成功运行它。
The problem was the location of my Snapshot folder. Once I moved it out of my models project folder, and up to one level in the folder hierarchy, I was able to run it successfully.