Skip to content

fix: _cortex_agent_exists relation arg type is not in dbt 1.12's grammar - #27

Open
mattsenicksigma wants to merge 1 commit into
Matts52:mainfrom
mattsenicksigma:fix/cortex-agent-exists-relation-type
Open

fix: _cortex_agent_exists relation arg type is not in dbt 1.12's grammar#27
mattsenicksigma wants to merge 1 commit into
Matts52:mainfrom
mattsenicksigma:fix/cortex-agent-exists-relation-type

Conversation

@mattsenicksigma

Copy link
Copy Markdown

Closes #26.

Summary

macros/relations/cortex_agent/helpers/schema.yml declares the _cortex_agent_exists macro's relation argument as type: SnowflakeRelation, which isn't in dbt 1.12's argument-type grammar (str/bool/int/float/any/relation/column, list[X], dict[K,V], optional[X]). The correct value is relation.

Every dbt parse/dbt compile/dbt build in a consuming project currently emits:

WARNING: Argument relation in the yaml for macro _cortex_agent_exists has an invalid type.

This file was added in v1.0.3 alongside the MCP server feature (#23), after #22's arg-type-grammar fix already merged — so it never got the same treatment.

Testing

Verified with scripts/run_compile_tests_duckdb.sh (compiles agent_*/forecaster_skill models against DuckDB):

  • Before the fix: dbt compile --select "agent_* forecaster_skill" --target duckdb --no-partial-parse emits the warning (confirmed by stashing the change and re-running).
  • After the fix: same command, zero warnings, and all agent/skill models still compile to identical output — this is a docs-only change, no macro logic touched.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

`SnowflakeRelation` isn't a recognized macro argument type in dbt 1.12
(valid: str/bool/int/float/any/relation/column, list[X], dict[K,V],
optional[X]) -- the correct value here is `relation`. Every dbt
parse/compile/build in a consuming project emits:

  WARNING: Argument relation in the yaml for macro _cortex_agent_exists
  has an invalid type.

This file was added in v1.0.3 alongside the MCP server feature, after
Matts52#22's arg-type-grammar fix already merged, so it never got the same
treatment.

Closes Matts52#26.
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.

_cortex_agent_exists macro arg type 'SnowflakeRelation' is invalid per dbt 1.12's argument-type grammar

1 participant