
    select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
      
    
  
    
    

with child as (
    select id_instituicao as from_field
    from "gold_warehouse"."main"."fato_balanco_patrimonial"
    where id_instituicao is not null
),

parent as (
    select id_instituicao as to_field
    from "gold_warehouse"."main"."dim_instituicao"
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null



  
  
      
    ) dbt_internal_test