mjirv / dbt-datamocktool

A dbt package for unit testing your SQL analytics models
Apache License 2.0
164 stars 20 forks source link

Warning on different lifecycles #31

Open chaimt opened 2 years ago

chaimt commented 2 years ago

Describe the bug

when running dbt seed, dbt run you get a warning on sources missing they are missing since they have not yet been created. check should be only on dbt test

Steps to reproduce

delete db run dbt seed

Expected results

no warnings

Actual results

[WARNING]: Test 'test.dbt_poc.dbt_datamocktool_unit_test_stg_loyalty_merchants_enrichment_ref_stg_swell_yotpo_platform_accounts_ref_stg_swell_merchants_ref_stg_swell_vip_tierssettingsExample_of_unit_testref_dmt_expected_dim_opportunity_ref_dmt_loyalty_stg_swell_yotpo_platformaccountsref_dmt_loyalty_stg_swell_merchants_ref_dmt_loyalty_stg_swell_vip_tierssettingsstg_loyalty_merchants_enrichment.5891bd3b17' (models/staging/loyalty/stg_loyalty_merchants_enrichment.yml) depends on a source named 'default.stg_swell_vip_tiers_settings' which was not found

Screenshots and log output

System information

The contents of your packages.yml file:

Which database are you using dbt with?

The output of dbt --version:

0.21
mjirv commented 2 years ago

@chaimt thanks for raising this. Is 'default.stg_swell_vip_tiers_settings'" a source or a ref (model/seed)?

chaimt commented 2 years ago

ref how does the lifecycle work?

mjirv commented 2 years ago

Interesting, the fact that the error message says "depends on a source" instead of "depends on a ref" is suspicious.

I couldn't replicate it, so I wonder if something weird is going on with the other databricks/spark change I made recently. Looking into it.