Montreal-Analytics / dbt-snowflake-utils

Snowflake-specific utility macros for dbt projects.
Apache License 2.0
107 stars 37 forks source link

Problem with apply_meta_as_tags macro not finding macro model_contains_tag_meta #24

Closed DavidfNZ closed 1 year ago

DavidfNZ commented 2 years ago

Hi. I'm new to dbt, and just trying out your new macro apply_meta_as_tags by installing your dbt package and then building just a single model, and I get this error:

dbt runtime exception Compilation Error in operation dx_dbt_pdb-on-run-end-0 (./dbt_project.yml) 'model_contains_tag_meta' is undefined > in macro apply_meta_as_tags (macros/apply_meta_as_tags.sql) > called by operation dx_dbt_pdb-on-run-end-0 (./dbt_project.yml)

I've found that if I copy and paste the macro model_contains_tag_meta into a separate macro sql file, then it seems to find it.

calleo commented 1 year ago

Happened to me as well. Using DBT 1.2. Same with 1.3.1. Very odd. Tried to move the macro to a separate file within the package, but that did not solve it. Had to move it into the dbt project for things to work.

MartinGuindon commented 1 year ago

@jamesweakley Can you take a look at this issue and related PR (#25 ) and let me know your thoughts?

jamesweakley commented 1 year ago

@MartinGuindon I'm happy with the PR in its current form

JFrackson commented 1 year ago

This is now resolved with @calleo's PR.