feat: document and test full Cortex Search tool_resource props (closes #3) - #4
Merged
Merged
Conversation
…#3) Add filter, max_results, title_column, and id_column to the README specification-mode example for Cortex Search tool_resources. Add a compile-only integration test model (agent_with_search) that exercises all five props via source(), backed by a sources.yml placeholder. The Snowflake live-build script excludes this model since no real search service exists in the test environment; the DuckDB compile test covers it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
filterto the Cortex Searchtool_resourcesexample in the README (was missing alongsidemax_results,title_column,id_column)integration_tests/models/agent_with_search.sql— a compile-only model that exercises all five Cortex Searchtool_resourcesprops (name,max_results,filter,title_column,id_column) viasource()integration_tests/models/sources.ymlwith a placeholder source definition so thesource()reference resolves at compile timeagent_with_searchfrom the live Snowflake build (no real search service in the test env); the DuckDB compile test covers it automatically via theagent_*globNotes
No macro or materialization changes were required. The
cortex_agentmaterialization already passes the model body through verbatim asFROM SPECIFICATION $$ ... $$, so alltool_resourcesfields (includingfilter) already work — this PR adds documentation and compile-time test coverage to make that explicit.Test plan
./scripts/run_compile_tests_duckdb.shand confirmagent_with_search.sqlappears in compiled output with the full YAML block (includingfilter) rendered correctlyagent_minimal,agent_with_semantic_view,agent_raw_ddl) compile unchangedagent_with_searchis excluded so no live search service is required🤖 Generated with Claude Code