Skip to content

fix: use supported type bool for mart_lookback_start argument `al… - #590

Open
piirxx wants to merge 1 commit into
brooklyn-data:mainfrom
piirxx:patch-1
Open

piirxx wants to merge 1 commit into
brooklyn-data:mainfrom
piirxx:patch-1

Conversation

@piirxx

@piirxx piirxx commented Nov 11, 2026

Copy link
Copy Markdown

Overview

Changes the declared type of the align_to_month argument on mart_lookback_start in macros/_macros.yml from boolean to bool. This is a one-line, documentation-only change. The macro's SQL is untouched.

Update type - breaking / non-breaking

  • Minor bug fix
  • Documentation improvements
  • Quality of Life improvements
  • New features (non-breaking change)
  • New features (breaking change)
  • Other (non-breaking change)
  • Other (breaking change)
  • Release preparation

What does this solve?

dbt validates the argument types declared in macro YAML (validate_macro_args, on by default in dbt 1.12). boolean is not one of the type names it accepts, so every project that installs the package gets this warning on each parse:

[WARNING]: Argument align_to_month in the yaml for macro mart_lookback_start has an invalid type.

Projects can only work around it by silencing InvalidMacroAnnotation for everything, which also hides real problems in their own macros.

Outstanding questions

None.

What databases have you tested with?

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • [] N/A

I checked it with dbt parse --no-partial-parse --show-all-deprecations on dbt Core 1.12.6, where the warning disappears.

…ign_to_month`

## Overview

Changes the declared type of the `align_to_month` argument on `mart_lookback_start` in `macros/_macros.yml` from `boolean` to `bool`. This is a one-line, documentation-only change. The macro's SQL is untouched.

## Update type - breaking / non-breaking

- [x] Minor bug fix
- [ ] Documentation improvements
- [ ] Quality of Life improvements
- [ ] New features (non-breaking change)
- [ ] New features (breaking change)
- [ ] Other (non-breaking change)
- [ ] Other (breaking change)
- [ ] Release preparation

## What does this solve?

dbt validates the argument types declared in macro YAML (`validate_macro_args`, on by default in dbt 1.12). `boolean` is not one of the type names it accepts, so every project that installs the package gets this warning on each parse:

```
[WARNING]: Argument align_to_month in the yaml for macro mart_lookback_start has an invalid type.
```

Projects can only work around it by silencing `InvalidMacroAnnotation` for everything, which also hides real problems in their own macros.

I checked every argument type declared in the package's YAML with dbt's own validator (`dbt.parser.schemas.is_valid_type`). This is the only one it rejects: it returns `False` for `boolean` and `True` for `bool`.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant