Montreal-Analytics / dbt-snowflake-utils

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

[Bug] apply_meta_as_tags macro does not work with dbt<1.1.0 #22

Closed ogr003 closed 1 year ago

ogr003 commented 1 year ago

Current behavior

Due to https://github.com/dbt-labs/dbt-core/issues/4459, the res.node.meta node is not populated, meaning that no database tags are added by the apply_meta_as_tags macro.

Expected behavior

Should identify all models that has populated the database_tags meta field.

Environment

dbt: 1.0.1

Additional context

The res.node.config.meta field looks to be populated in dbt==1.0.1, so a suggested approach could be to use this instead. Alternatively, the dbt version constraint could be updated to dbt>=1.1.0, when the issue was resolved.

MartinGuindon commented 1 year ago

@jamesweakley Do you want to take a look?

jamesweakley commented 1 year ago

@MartinGuindon yes I’ll take a look

jamesweakley commented 1 year ago

@ogr003 thanks for reporting the issue and also pointing out the solution!

I've opened a PR for this.

MartinGuindon commented 1 year ago

Fixed in release 0.4.1. Thanks @jamesweakley !