【发布时间】:2021-10-25 18:32:08
【问题描述】:
我是dbt的新用户,正在尝试写一个关系测试:
- name: PROTOCOL_ID
tests:
- relationships:
to: ref('Animal_Protocols')
field: id
我收到此错误:
Compilation Error
Invalid test config given in models/Animal_Protocols/schema.yml:
test definition dictionary must have exactly one key, got [('relationships', None), ('to', "ref('Animal_Protocols')"), ('field', 'id')] instead (3 keys)
@: UnparsedNodeUpdate(original_file_path='model...ne)
同一文件中的“unique”和“not-null”测试工作正常,但“accepted_values”出现类似错误。
我在 MacOS Big Sur 11.6 上使用带有 Snowflake 的 dbt cli 版本 0.21.0。
【问题讨论】:
标签: dbt