dbt-datamocktool
dbt-datamocktool copied to clipboard
error on build
Describe the bug
when i build my project i get the following error Runtime Error Compilation Error in test dbt_datamocktool_unit_test_stg_customers_ref_dmt__expected_stg_customers_1___ref_dmt__raw_customers_1_ (models/schema.yml) dbt was unable to infer all dependencies for the model "dbt_datamocktool_unit_test_stg_customers_ref_dmt__expected_stg_customers_1___ref_dmt__raw_customers_1_". This typically happens when ref() is placed within a conditional block.
To fix this, add the following hint to the top of the model "dbt_datamocktool_unit_test_stg_customers_ref_dmt__expected_stg_customers_1___ref_dmt__raw_customers_1_":
-- depends_on: {{ ref('raw_customers') }}
> in macro get_unit_test_sql (macros/dmt_get_test_sql.sql)
> called by macro test_unit_test (macros/dmt_unit_test.sql)
> called by test dbt_datamocktool_unit_test_stg_customers_ref_dmt__expected_stg_customers_1___ref_dmt__raw_customers_1_ (models/schema.yml)
> called by test dbt_datamocktool_unit_test_stg_customers_ref_dmt__expected_stg_customers_1___ref_dmt__raw_customers_1_ (models/schema.yml)
System information
The contents of your packages.yml file:
Which database are you using dbt with?
- [ ] postgres
- [ ] redshift
- [ ] bigquery
- [ ] snowflake
- [ x] other (specify: databricks__)
The output of dbt --version:
0.21
Thanks for submitting this @chaimt and the fix PR. I suspect it's related to Databricks since this package hasn't been tested on Databricks before. I want to dig in a little deeper to make sure I understand the source of the issue. Can you confirm which version of the package you're using?
- package: mjirv/dbt_datamocktool version: [">=0.1.4"]
On Mon, Nov 1, 2021 at 6:58 PM Michael Irvine @.***> wrote:
Thanks for submitting this @chaimt https://github.com/chaimt and the fix PR. I suspect it's related to Databricks since this package hasn't been tested on Databricks before. I want to dig in a little deeper to make sure I understand the source of the issue. Can you confirm which version of the package you're using?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mjirv/dbt-datamocktool/issues/20#issuecomment-956407006, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAGTZ7OPBDDUIXBXBT43NDUJ3BMJANCNFSM5HEBSEHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- חיים טורקל
i added a pull request for this
Thanks for submitting the PR @chaimt!
I'd prefer to not make the user specify the depends_on field if at all possible. I made the PR #25 to see if that is possible, but can't test it since I don't have Databricks. When you have a chance, could you see if that fixes it for you?
packages.yml:
- git: "https://github.com/mjirv/dbt-datamocktool.git"
revision: "bugfix-databricks_missing_depends"