You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check-model-parents-and-childs hook does not consider seeds as parents, so if a model only has a seed as a parent, it throws a failure when configured to have --min-parent-count > 0
Create model under models directory which references the seed as a parent
models/<schema>/dim_countries.sql
with
country as (
select*from {{ ref('cfg_countries') }}
)
select*from country
models/_models.yml
version: 2models:
- name: dim_countries
Run dbt seed and dbt build so model is in manifest (as required by the hook)
run pre-commit and see error:
pre-commit run check-model-parents-and-childs
Check the model has a parents/childs.....................................Failed
- hook id: check-model-parents-and-childs
- exit code: 1
dim_countries: has 0 min, but min 1is/are required.
Expected behavior
The hook recognises a seed as a parent for the purposes of a min-parent-count
Version: v1.1.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
check-model-parents-and-childs
hook does not consider seeds as parents, so if a model only has a seed as a parent, it throws a failure when configured to have--min-parent-count
> 0To Reproduce
Steps to reproduce the behavior:
seeds
directoryseeds/<schema>/cfg_countries.csv
seeds/_seeds.yml
models
directory which references the seed as a parentmodels/<schema>/dim_countries.sql
models/_models.yml
Run dbt seed and dbt build so model is in manifest (as required by the hook)
run pre-commit and see error:
pre-commit run check-model-parents-and-childs Check the model has a parents/childs.....................................Failed - hook id: check-model-parents-and-childs - exit code: 1 dim_countries: has 0 min, but min 1is/are required.
Expected behavior
The hook recognises a seed as a parent for the purposes of a min-parent-count
Version:
v1.1.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: