fix: _cortex_agent_exists relation arg type is not in dbt 1.12's grammar - #27
Open
mattsenicksigma wants to merge 1 commit into
Open
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #26.
Summary
macros/relations/cortex_agent/helpers/schema.ymldeclares the_cortex_agent_existsmacro'srelationargument astype: 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 isrelation.Every
dbt parse/dbt compile/dbt buildin a consuming project currently emits:This file was added in
v1.0.3alongside 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(compilesagent_*/forecaster_skillmodels against DuckDB):dbt compile --select "agent_* forecaster_skill" --target duckdb --no-partial-parseemits the warning (confirmed by stashing the change and re-running).Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com