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-column-name-contract (and maybe other checkpoints based on Catalog) does not work with Versioned models #203

Open
awal11 opened this issue Apr 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@awal11
Copy link
Contributor

awal11 commented Apr 5, 2024

check-column-name-contract always returns nothing ("Passed") for Versioned models.

In my debugging it seems that the problem is caused in this line
models = get_models(catalog, filenames, include_disabled=include_disabled)
with 'catalog' as a parameter instead of 'manifest'

Called this way get_models() - returns no models, as inside it, the call to node.get('version') returns None and the filenames are not matched to the models.

Now I do not know how to fix it, as it seems that the call to get_models() with catalog is needed to later check the data types, I do not understand the internals of dbt-checkpoint enough.

@awal11 awal11 added the bug Something isn't working label Apr 5, 2024
@awal11 awal11 changed the title check-column-name-contract does not work with Versioned models check-column-name-contract (and maybe other checkpoints based on Schema) does not work with Versioned models Apr 5, 2024
@awal11
Copy link
Contributor Author

awal11 commented Apr 5, 2024

the same problem happens in check-model-name-contract in this line
Looking at that - this might affect any other test that relies only on catalog.json?

@awal11 awal11 changed the title check-column-name-contract (and maybe other checkpoints based on Schema) does not work with Versioned models check-column-name-contract (and maybe other checkpoints based on Catalog) does not work with Versioned models Apr 5, 2024
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

1 participant