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

check-model-has-properties-file fails on macro with a valid properties yml #17

Closed
andrewlee-trouva opened this issue Mar 24, 2021 · 3 comments · Fixed by #18
Closed
Assignees
Labels
bug Something isn't working

Comments

@andrewlee-trouva
Copy link

Describe the bug
When running the test check-model-has-properties-file with a macro, the test fails with the following error.

Check the model has properties file......................................Failed
- hook id: check-model-has-properties-file
- exit code: 1

macros/grant_select_on_schemas.sql: does not have model properties defined in any .yml file.

The .pre-commit-config.yaml includes the rule:

repos:
- repo: https://github.com/offbi/pre-commit-dbt
  rev: 607cb07a1918442f5963662a9aa19da8984931e6
  hooks:
  - id: check-model-has-properties-file

And the macro has the following .yml file (the filename is the same as the macro name and is stored within the macros folder):


macros:
  - name: grant_select_on_schemas
    description: "Grants privileges to groups after dbt run"
    docs:
      show: false

Hope we can get this fixed soon as this is a really useful test to include

@tomsej
Copy link
Contributor

tomsej commented Apr 7, 2021

Thanks, @andrewlee-trouva for reporting this. Think it should be fixed in #18. If you want to test that now, you can update your pre-commit-dbt version with pre-commit autoupdate --bleeding-edge or you can wait for the new release (that is hopefully gonna be published soon :D)

@andrewlee-trouva
Copy link
Author

andrewlee-trouva commented Apr 7, 2021

Thanks @tomsej , I've tested this and looks like it all works, thanks for fixing! 👍

@tomsej
Copy link
Contributor

tomsej commented Apr 7, 2021

@andrewlee-trouva thanks a lot!!

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

Successfully merging a pull request may close this issue.

2 participants