Skip to main content

Snowflake

@mfbaig35r/snowflakev2026.06.01.1· 2d agoMODELS
01README

Snowflake warehouses, databases, schemas, stages, tasks, pipes, secrets, and grants as Swamp models. Compose Snowflake pipelines with non-Snowflake resources in Swamp workflows. Backed by the Snowflake SQL Statement Execution API (v2).

02Release Notes

v0.2 (2026.06.01.1) - database + schema models

Two new models in the @mfbaig35r/snowflake pack:

  • @mfbaig35r/snowflake/database: create, read, update, delete, list, adopt, create_or_update. Supports TRANSIENT databases, DATA_RETENTION_TIME_IN_DAYS, MAX_DATA_EXTENSION_TIME_IN_DAYS, DEFAULT_DDL_COLLATION. delete defaults to RESTRICT (Snowflake's default); pass cascade=true to wipe contained schemas.

  • @mfbaig35r/snowflake/schema: same method set, scoped to a parent database. Swamp resources keyed by '.' so the same schema name across databases does not collide. Supports WITH MANAGED ACCESS at create and ENABLE/DISABLE MANAGED ACCESS on update.

warehouse model version bumped to 2026.06.01.1 alongside.

Total models: 3.

03Models3
@mfbaig35r/snowflake/warehousev2026.06.01.1warehouse.ts
fn create(name: string, warehouse_type: enum, auto_suspend_seconds?: number, auto_resume: boolean, min_cluster_count: number, max_cluster_count: number, scaling_policy: enum, initially_suspended: boolean, comment?: string)
Create a warehouse via CREATE WAREHOUSE. Defaults to
ArgumentTypeDescription
namestring
warehouse_typeenum
auto_suspend_seconds?numberSeconds idle before auto-suspend. null disables auto-suspend.
auto_resumeboolean
min_cluster_countnumber
max_cluster_countnumber
scaling_policyenum
initially_suspendedbooleanIf true (default), the warehouse is created in SUSPENDED state so
comment?string
fn read(warehouse_ref: string)
Fetch live warehouse state via SHOW WAREHOUSES LIKE '<name>'.
ArgumentTypeDescription
warehouse_refstring
fn list()
List all warehouses on the account via SHOW WAREHOUSES. Returns the
fn adopt(name: string)
Register an existing warehouse as a Swamp 'warehouse' resource
ArgumentTypeDescription
namestring
fn update(warehouse_ref: string)
Update warehouse settings via ALTER WAREHOUSE <name> SET ... .
ArgumentTypeDescription
warehouse_refstring
fn delete(warehouse_ref: string)
Drop the warehouse via DROP WAREHOUSE IF EXISTS <name>.
ArgumentTypeDescription
warehouse_refstring
fn resume(warehouse_ref: string)
Resume the warehouse via ALTER WAREHOUSE <name> RESUME IF SUSPENDED.
ArgumentTypeDescription
warehouse_refstring
fn suspend(warehouse_ref: string)
Suspend the warehouse via ALTER WAREHOUSE <name> SUSPEND.
ArgumentTypeDescription
warehouse_refstring
fn run_query(warehouse_ref: string, statement: string, database?: string, schema?: string, role?: string, server_timeout_seconds: number, async_exec: boolean)
Submit a SQL statement via POST /api/v2/statements bound to this
ArgumentTypeDescription
warehouse_refstring
statementstring
database?string
schema?string
role?string
server_timeout_secondsnumberServer-side execution timeout. Snowflake caps at 172800s (48h).
async_execbooleantrue = return immediately with statement_handle (state RUNNING); poll
fn wait_statement(statement_handle: string, poll_seconds: number, timeout_seconds: number)
Poll GET /api/v2/statements/{handle} until the statement reaches a
ArgumentTypeDescription
statement_handlestring
poll_secondsnumber
timeout_secondsnumber
fn cancel_statement(statement_handle: string)
Cancel a running statement via POST /api/v2/statements/{handle}/cancel.
ArgumentTypeDescription
statement_handlestring
fn create_or_update(name: string, warehouse_type: enum, auto_suspend_seconds?: number, auto_resume: boolean, min_cluster_count: number, max_cluster_count: number, scaling_policy: enum, initially_suspended: boolean, comment?: string)
Reconcile via account state + Swamp data: SHOW WAREHOUSES for the
ArgumentTypeDescription
namestring
warehouse_typeenum
auto_suspend_seconds?numberSeconds idle before auto-suspend. null disables auto-suspend.
auto_resumeboolean
min_cluster_countnumber
max_cluster_countnumber
scaling_policyenum
initially_suspendedbooleanIf true (default), the warehouse is created in SUSPENDED state so
comment?string

Resources

warehouse(infinite)— A Snowflake virtual warehouse, keyed by user-supplied name. State
last_statement(workflow)— Most recent statement submitted through this model. sql_preview is
@mfbaig35r/snowflake/databasev2026.06.01.1database.ts
fn create(name: string, transient: boolean, data_retention_time_in_days: number, max_data_extension_time_in_days?: number, default_ddl_collation?: string, comment?: string)
Create a database via CREATE DATABASE / CREATE TRANSIENT DATABASE.
ArgumentTypeDescription
namestring
transientbooleanIf true, emits CREATE TRANSIENT DATABASE. Transient databases skip
data_retention_time_in_daysnumberTime Travel retention. 0..90 for standard, 0..1 for transient.
max_data_extension_time_in_days?numberMax days Snowflake can extend retention past the configured value
default_ddl_collation?string
comment?string
fn read(database_ref: string)
Fetch live database state via SHOW DATABASES LIKE '<name>'.
ArgumentTypeDescription
database_refstring
fn list()
List all databases on the account via SHOW DATABASES. Returns the
fn adopt(name: string)
Register an existing database as a Swamp 'database' resource
ArgumentTypeDescription
namestring
fn update(database_ref: string)
Update database settings via ALTER DATABASE <name> SET ... .
ArgumentTypeDescription
database_refstring
fn delete(database_ref: string, cascade: boolean)
Drop the database via DROP DATABASE IF EXISTS <name> [CASCADE].
ArgumentTypeDescription
database_refstring
cascadeboolean
fn create_or_update(name: string, transient: boolean, data_retention_time_in_days: number, max_data_extension_time_in_days?: number, default_ddl_collation?: string, comment?: string)
Reconcile via account state: SHOW DATABASES for the name. If the
ArgumentTypeDescription
namestring
transientbooleanIf true, emits CREATE TRANSIENT DATABASE. Transient databases skip
data_retention_time_in_daysnumberTime Travel retention. 0..90 for standard, 0..1 for transient.
max_data_extension_time_in_days?numberMax days Snowflake can extend retention past the configured value
default_ddl_collation?string
comment?string

Resources

database(infinite)— A Snowflake database, keyed by name. State refreshed on read.
@mfbaig35r/snowflake/schemav2026.06.01.1schema.ts
fn create(database: string, name: string, transient: boolean, managed_access: boolean, data_retention_time_in_days: number, default_ddl_collation?: string, comment?: string)
Create a schema via CREATE SCHEMA / CREATE TRANSIENT SCHEMA,
ArgumentTypeDescription
databasestringParent database name.
namestringSchema name (NOT db.schema).
transientbooleanIf true, emits CREATE TRANSIENT SCHEMA. Transient schemas skip
managed_accessbooleanWITH MANAGED ACCESS at create time. In a managed-access schema, only
data_retention_time_in_daysnumber
default_ddl_collation?string
comment?string
fn read(schema_ref: string)
Fetch live schema state via SHOW SCHEMAS LIKE '<name>' IN DATABASE <db>.
ArgumentTypeDescription
schema_refstring
fn list(database: string)
List schemas in a database via SHOW SCHEMAS IN DATABASE <db>.
ArgumentTypeDescription
databasestring
fn adopt(database: string, name: string)
Register an existing schema as a Swamp 'schema' resource without
ArgumentTypeDescription
databasestring
namestring
fn update(schema_ref: string)
Update schema settings via ALTER SCHEMA <db>.<name> SET ... . If
ArgumentTypeDescription
schema_refstring
fn delete(schema_ref: string, cascade: boolean)
Drop the schema via DROP SCHEMA IF EXISTS <db>.<name> [CASCADE].
ArgumentTypeDescription
schema_refstring
cascadeboolean
fn create_or_update(database: string, name: string, transient: boolean, managed_access: boolean, data_retention_time_in_days: number, default_ddl_collation?: string, comment?: string)
Reconcile via account state: SHOW SCHEMAS LIKE for the name in
ArgumentTypeDescription
databasestringParent database name.
namestringSchema name (NOT db.schema).
transientbooleanIf true, emits CREATE TRANSIENT SCHEMA. Transient schemas skip
managed_accessbooleanWITH MANAGED ACCESS at create time. In a managed-access schema, only
data_retention_time_in_daysnumber
default_ddl_collation?string
comment?string

Resources

schema(infinite)— A Snowflake schema, keyed by '<database>.<schema>'. State
04Previous Versions1
2026.06.01.0Jun 1, 2026

v0.1 (2026.06.01.0) - initial release

First model in the @mfbaig35r/snowflake pack:

  • @mfbaig35r/snowflake/warehouse: create, read, update, delete, list, adopt, resume, suspend, run_query, wait_statement, cancel_statement, create_or_update. Mirrors the shape of @mfbaig35r/databricks/sql_warehouse so workflows that span both platforms compose cleanly.

Backed by the Snowflake SQL Statement Execution API v2. Auth: PAT (default) or JWT key-pair (RS256, RSA private key resolved via CEL vault.get).

05Stats
A
100 / 100
Downloads
0
Archive size
34.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels