The problem I’m having
I have two pipelines that culminate in two models each, one acting as the parent (referred) model, the other being the child (referring) . The Child model also has a relationship test defined using ref(‘Parent’)
When I invoke a ‘dbt build +parent’, I notice that the execution fails, and that the relationship test on the Child (relationships_Child_KeyColumn___ref_Parent_KeyColumn) is being run.
Since the child model does not exist yet, nor is it part of the +Parent pipeline, I’m surprised at why the relationship test is being executed as part of the Parent job?
Some example code or error messages
Child yml:
columns:
- name: FK_ID
tests:
- not_null
- relationships:
field: PK_ID
to: ref('Parent')