Manage stages, run Snowpark Python, and use Cortex search to power advanced data workflows in Snowflake.
Stage Operations
Snowpark Python
Cortex Search
Artifacts
_list_stage_contents
Name | Definition | Format |
---|---|---|
database | Target database name. | String |
schema | Target schema name. | String |
stage | Stage name to inspect. | String |
pattern | Filename or glob-style pattern to filter results. | String |
_add_file_to_stage
Name | Definition | Format |
---|---|---|
database | Database that owns the stage. | String |
schema | Schema that owns the stage. | String |
stage | Stage name. | String |
file_name | Full local path to the file to upload. | String |
target_path | Optional subfolder on the stage, exclude the filename. | String |
_delete_file_from_stage
Name | Definition | Format |
---|---|---|
database | Database that owns the stage. | String |
schema | Schema that owns the stage. | String |
stage | Stage name. | String |
file_name | Original filename on the stage, with optional path. | String |
_read_file_from_stage
Name | Definition | Format |
---|---|---|
database | Database that owns the stage. | String |
schema | Schema that owns the stage. | String |
stage | Stage name. | String |
file_name | Filename on the stage, with optional path. | String |
return_contents | Return file contents instead of only the filename. | Boolean |
is_binary | Treat file as binary when returning contents. | Boolean |
max_bytes | Maximum bytes to return when streaming content. Default 10000. | Integer |
save_artifacts | Save the downloaded file as an artifact with a link for reuse and sharing. | Boolean |
is_binary = true
. If you also set save_artifacts = true
, the file will be persisted and returned with an artifact link._cortex_search
Name | Definition | Format |
---|---|---|
service_name | Name of the configured Cortex search service. | String |
query | Short text query to search for. | String |
top_n | Number of top results to return. Default 15, max 25. | Integer |
_run_snowpark_python
Name | Definition | Format |
---|---|---|
code | Python code to execute in Snowpark. | String |
purpose | Human-readable explanation used for validation and auditing. | String |
packages | Comma-separated list of additional packages to install. | String |
note_id | Execute previously saved code by note id instead of passing code . | String |
save_artifacts | Persist outputs as artifacts for later access and sharing. | Boolean |
_add_file_to_stage
or verify with _list_stage_contents
._run_snowpark_python
with access to Snowflake data._cortex_search
for AI-ranked retrieval when needed._read_file_from_stage
, optionally saving results as artifacts.USAGE
on the database and schema, plus required privileges on the stage.result
variable in your code to capture returned output.is_binary = true
and max_bytes
tuning.result
, console logs, and optional artifacts for downstream use.