dbt-labs/dbt-core · error

fetch macro present

Error message

fetch macro present

What it means

Test-only assertion in the propagation-macros test: the built-in macro list must contain dbt_classification.fetch_snowflake_column_tags. Fires only if the embedded macro template is renamed or dropped from propagation_macro_templates().

Solutions

  1. Restore the fetch_snowflake_column_tags entry in propagation_macro_templates
  2. Keep macro names in sync with the classification feature
  3. Update the test if the macro is intentionally renamed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-classification-types/src/macros.rs:100 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/40f2223e61cebad1. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-classification-types/src/macros.rs:100

        let templates = propagation_macro_templates();
        let names: Vec<&str> = templates.iter().map(|(n, _)| n.as_str()).collect();
        assert!(
            names.contains(&"dbt_classification.fetch_snowflake_column_tags"),
            "got: {names:?}"
        );
        assert!(
            names.contains(&"dbt_classification.apply_snowflake_column_tag"),
            "got: {names:?}"
        );
    }

    #[test]
    fn fetch_macro_content_references_tag_references_all_columns() {
        let templates = propagation_macro_templates();
        let (_, sql) = templates
            .iter()
            .find(|(n, _)| n == "dbt_classification.fetch_snowflake_column_tags")
            .expect("fetch macro present");
        assert!(sql.contains("TAG_REFERENCES_ALL_COLUMNS"));
    }

    #[test]
    fn apply_macro_content_references_alter_relation_set_tag() {
        let templates = propagation_macro_templates();
        let (_, sql) = templates
            .iter()
            .find(|(n, _)| n == "dbt_classification.apply_snowflake_column_tag")
            .expect("apply macro present");
        assert!(sql.contains("ALTER"));
        assert!(sql.contains("SET TAG"));
    }
}

View on GitHub (pinned to 0267ce9170)