Skip to main content
Snowflake logo

Overview

Add Snowflake to any ModuleX agent or workflow. Snowflake data warehouse integration via snowflake-connector-python (the official driver). Provides SQL execution, batched inserts, and introspection (databases/schemas/tables/warehouses).
Categories: Databases · Database · Data Warehouse · Analytics · Auth: Snowflake Credentials · Actions: 9

Authentication

Snowflake Credentials

Authenticate with Snowflake account credentials (account/user/password/warehouse).

Required Credentials

FieldDescriptionRequiredFormat
AccountSnowflake account identifier (e.g. xy12345.us-east-1)Yesxy12345.us-east-1
UsernameSnowflake usernameYes-
PasswordSnowflake passwordYes-
WarehouseCompute warehouse to use for queriesYes-
DatabaseDefault database (optional)No-
SchemaDefault schema (optional)No-
RoleOptional Snowflake role to assumeNo-

Available Actions

Parameters

query
string
required
The SQL to execute
binds
array
Bind values for ‘%s’ placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteSqlQueryOutput",
  "type": "object"
}

Parameters

table_name
string
required
Fully qualified table (DATABASE.SCHEMA.TABLE) — or just TABLE if database/schema is set in auth_data
values
object
required
Column-value pairs to insert

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "rows_inserted": {
      "default": 0,
      "title": "Rows Inserted",
      "type": "integer"
    },
    "columns": {
      "items": {
        "type": "string"
      },
      "title": "Columns",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "InsertRowOutput",
  "type": "object"
}

Parameters

table_name
string
required
Fully qualified table (DATABASE.SCHEMA.TABLE) — or just TABLE if database/schema is set in auth_data
columns
array
required
Column names
values
array
required
List of rows, each a list of values matching columns
batch_size
integer
Rows per batch (clamped to 10-1000) (Default: 100)

Response

{
  "$defs": {
    "BatchResult": {
      "additionalProperties": false,
      "properties": {
        "batch_index": {
          "title": "Batch Index",
          "type": "integer"
        },
        "rows_processed": {
          "title": "Rows Processed",
          "type": "integer"
        },
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        }
      },
      "required": [
        "batch_index",
        "rows_processed",
        "success"
      ],
      "title": "BatchResult",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "total_rows": {
      "default": 0,
      "title": "Total Rows",
      "type": "integer"
    },
    "rows_inserted": {
      "default": 0,
      "title": "Rows Inserted",
      "type": "integer"
    },
    "total_batches": {
      "default": 0,
      "title": "Total Batches",
      "type": "integer"
    },
    "successful_batches": {
      "default": 0,
      "title": "Successful Batches",
      "type": "integer"
    },
    "failed_batches": {
      "default": 0,
      "title": "Failed Batches",
      "type": "integer"
    },
    "batch_size": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Batch Size"
    },
    "batch_results": {
      "items": {
        "$ref": "#/$defs/BatchResult"
      },
      "title": "Batch Results",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "InsertMultipleRowsOutput",
  "type": "object"
}

Response

{
  "$defs": {
    "DatabaseEntry": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "owner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Owner"
        },
        "created_on": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created On"
        },
        "comment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Comment"
        }
      },
      "title": "DatabaseEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "databases": {
      "items": {
        "$ref": "#/$defs/DatabaseEntry"
      },
      "title": "Databases",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListDatabasesOutput",
  "type": "object"
}

Parameters

database
string
required
Database name

Response

{
  "$defs": {
    "SchemaEntry": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "database_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Database Name"
        },
        "owner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Owner"
        },
        "created_on": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created On"
        },
        "comment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Comment"
        }
      },
      "title": "SchemaEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "database": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Database"
    },
    "schemas": {
      "items": {
        "$ref": "#/$defs/SchemaEntry"
      },
      "title": "Schemas",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListSchemasOutput",
  "type": "object"
}

Parameters

database
string
required
Database name
schema_name
string
required
Schema name

Response

{
  "$defs": {
    "TableEntry": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "database_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Database Name"
        },
        "schema_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Schema Name"
        },
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Kind"
        },
        "owner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Owner"
        },
        "rows": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Rows"
        },
        "created_on": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created On"
        },
        "comment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Comment"
        }
      },
      "title": "TableEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "database": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Database"
    },
    "schema_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Schema Name"
    },
    "tables": {
      "items": {
        "$ref": "#/$defs/TableEntry"
      },
      "title": "Tables",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListTablesOutput",
  "type": "object"
}

Response

{
  "$defs": {
    "WarehouseEntry": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State"
        },
        "size": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Size"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        },
        "owner": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Owner"
        },
        "auto_suspend": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Auto Suspend"
        },
        "auto_resume": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Auto Resume"
        },
        "created_on": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created On"
        },
        "comment": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Comment"
        }
      },
      "title": "WarehouseEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "warehouses": {
      "items": {
        "$ref": "#/$defs/WarehouseEntry"
      },
      "title": "Warehouses",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListWarehousesOutput",
  "type": "object"
}

Parameters

table_name
string
required
Fully qualified table (DATABASE.SCHEMA.TABLE) — or just TABLE if database/schema is set in auth_data

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "columns": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Columns",
      "type": "array"
    },
    "column_count": {
      "default": 0,
      "title": "Column Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "DescribeTableOutput",
  "type": "object"
}

Parameters

table_name
string
required
Fully qualified table (DATABASE.SCHEMA.TABLE) — or just TABLE if database/schema is set in auth_data
limit
integer
Rows to sample (clamped 1-1000) (Default: 10)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetTableSampleOutput",
  "type": "object"
}

MySQL

PostgreSQL

Supabase