Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on build #20

Open
4 tasks
chaimt opened this issue Nov 1, 2021 · 4 comments
Open
4 tasks

error on build #20

chaimt opened this issue Nov 1, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@chaimt
Copy link
Contributor

chaimt commented Nov 1, 2021

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
@chaimt chaimt added the bug Something isn't working label Nov 1, 2021
@mjirv
Copy link
Owner

mjirv commented Nov 1, 2021

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?

@chaimt
Copy link
Contributor Author

chaimt commented Nov 1, 2021 via email

@chaimt
Copy link
Contributor Author

chaimt commented Nov 1, 2021

i added a pull request for this

@mjirv
Copy link
Owner

mjirv commented Nov 2, 2021

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"

@mjirv mjirv mentioned this issue Nov 3, 2021
5 tasks
@mjirv mjirv self-assigned this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants