KosmoKrator

database

Snowflake CLI for Cron Jobs

Use the Snowflake CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.

9 functions 8 read 1 write Manual OAuth token auth

Snowflake CLI for Cron Jobs

Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.

Use the headless CLI from cron when an operation should run without an interactive agent session. The Snowflake CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Snowflake CLI for Cron Jobs
kosmokrator integrations:configure snowflake --set access_token="$SNOWFLAKE_ACCESS_TOKEN" --set account="$SNOWFLAKE_ACCOUNT" --enable --read allow --write ask --json
kosmo integrations:call snowflake.snowflake_execute_query '{"sql":"example_sql","warehouse":"example_warehouse","database":"example_database","schema":"example_schema"}' --json

Discovery Before Execution

Agents and scripts can inspect Snowflake docs and schemas before choosing a function.

kosmo integrations:docs snowflake --json
kosmo integrations:docs snowflake.snowflake_execute_query --json
kosmo integrations:schema snowflake.snowflake_execute_query --json
kosmo integrations:search "Snowflake" --json
kosmo integrations:list --json

Useful Snowflake CLI Functions

FunctionTypeParametersDescription
snowflake.snowflake_execute_query Write sql, warehouse, database, schema Execute a SQL statement on Snowflake. Returns column metadata and result rows. Optionally specify warehouse, database, and schema context.
snowflake.snowflake_list_databases Read none List all databases in the Snowflake account. Returns database names, identifiers, and creation timestamps.
snowflake.snowflake_get_database Read database Get details for a specific Snowflake database, including retention time, owner, and size.
snowflake.snowflake_list_schemas Read database List all schemas within a Snowflake database. Returns schema names and metadata.
snowflake.snowflake_list_tables Read database, schema List all tables within a Snowflake database schema. Returns table names, types, and metadata.
snowflake.snowflake_describe_table Read database, schema, table Describe a Snowflake table — get column names, data types, nullable, default values, and other metadata.
snowflake.snowflake_list_warehouses Read none List all warehouses in the Snowflake account. Returns warehouse names, sizes, and status.
snowflake.snowflake_get_warehouse Read name Get details for a specific Snowflake warehouse, including size, type, auto-suspend, and auto-resume settings.
snowflake.snowflake_get_current_user Read none Get the current authenticated Snowflake user and session information.

Automation Notes

Related Snowflake CLI Pages