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

hook check-model-has-meta-keys not correctly identifying defined meta key #92

Open
fredmny opened this issue Feb 6, 2023 · 1 comment
Labels
bug Something isn't working priority: high

Comments

@fredmny
Copy link

fredmny commented Feb 6, 2023

Describe the bug
We are using the check-model-has-meta-keys hook to check if our models have owners defined, but even with the key correctly defined (I also checked manifest.json to be sure) the hook raises an error for the models saying the owner is not defined.

It seems it's not seeing the meta keys defined at a folder level, since we are defining in our dbt_project.yml

from manifest.json:

        "model.analytics.analytics_ci_runs": {
            "raw_sql": "...",
            "compiled": true,
           ...
            "config": {
                "enabled": true,
                "alias": "ci_runs",
                "schema": "...",
                "database": null,
                "tags": [
                    "daily"
                ],
                "meta": {
                    "is_gold": true,
                    "owner": "analyt....@.....t.com.br"
                },

And the response from the hook:
image

If this is actually an error I'd be glad to contribute if you could point me in the right direction

To Reproduce
Steps to reproduce the behavior:

  1. Add owner to group of models (folder) in dbt_project.yml file
  2. Add following config to the .pre-commit-config.yaml
      - id: check-source-has-meta-keys
        args: ['--meta-keys', 'owner', "--"]
  1. Execute pre-commit

Expected behavior
A clear and concise description of what you expected to happen.

Version:
v.1.0.1 of dbt-gloss

Additional context

@fredmny fredmny added the bug Something isn't working label Feb 6, 2023
@vsayer
Copy link

vsayer commented Nov 1, 2023

It'd be great to have support for checking meta at the dbt_project.yml level!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Projects
None yet
Development

No branches or pull requests

3 participants