Snowflake · Arazzo Workflow

Snowflake Create Table and Insert Rows via SQL

Version 1.0.0

Run a CREATE TABLE DDL statement, then run an INSERT statement against it.

1 workflow 1 source API 1 provider
View Spec View on GitHub DataData WarehouseData LakehouseCloud Data PlatformAnalyticsArtificial IntelligenceData EngineeringData GovernanceSQLApache IcebergModel Context ProtocolT1ArazzoWorkflows

Provider

snowflake

Workflows

create-table-and-insert-via-sql
Create a table with a DDL statement, then insert rows with a second statement.
Submits a CREATE TABLE statement followed by an INSERT statement through the SQL API, chaining the two so the insert runs only after the create returns a successful result.
2 steps inputs: authToken, createStatement, database, insertStatement, schema, tokenType, warehouse outputs: createHandle, insertHandle, numRowsInserted
1
createTable
Submit the CREATE TABLE DDL statement. A 200 indicates the table was created successfully.
2
insertRows
Submit the INSERT statement against the newly created table. A 200 returns execution stats including the number of rows inserted.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Snowflake Create Table and Insert Rows via SQL
  summary: Run a CREATE TABLE DDL statement, then run an INSERT statement against it.
  description: >-
    A two-statement provisioning flow expressed entirely through the Snowflake
    SQL API. The first step submits a CREATE TABLE DDL statement, and the second
    step submits an INSERT statement that loads rows into the table that was just
    created. Both statements run against the same warehouse, database, and
    schema. Each step inlines its Authorization bearer token and the
    X-Snowflake-Authorization-Token-Type header so the requests can be read and
    executed without opening the OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: statementsApi
  url: ../openapi/snowflake-statements-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-table-and-insert-via-sql
  summary: Create a table with a DDL statement, then insert rows with a second statement.
  description: >-
    Submits a CREATE TABLE statement followed by an INSERT statement through the
    SQL API, chaining the two so the insert runs only after the create returns a
    successful result.
  inputs:
    type: object
    required:
    - authToken
    - createStatement
    - insertStatement
    - warehouse
    - database
    - schema
    properties:
      authToken:
        type: string
        description: Bearer token (KEYPAIR_JWT, OAUTH, or programmatic access token).
      tokenType:
        type: string
        description: Value for the X-Snowflake-Authorization-Token-Type header.
        default: OAUTH
      createStatement:
        type: string
        description: The CREATE TABLE DDL statement.
      insertStatement:
        type: string
        description: The INSERT statement to load rows into the new table.
      warehouse:
        type: string
        description: Warehouse to use when executing the statements.
      database:
        type: string
        description: Database in which the statements should be executed.
      schema:
        type: string
        description: Schema in which the statements should be executed.
  steps:
  - stepId: createTable
    description: >-
      Submit the CREATE TABLE DDL statement. A 200 indicates the table was
      created successfully.
    operationId: submitStatement
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.authToken
    - name: X-Snowflake-Authorization-Token-Type
      in: header
      value: $inputs.tokenType
    requestBody:
      contentType: application/json
      payload:
        statement: $inputs.createStatement
        warehouse: $inputs.warehouse
        database: $inputs.database
        schema: $inputs.schema
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      createHandle: $response.body#/statementHandle
  - stepId: insertRows
    description: >-
      Submit the INSERT statement against the newly created table. A 200 returns
      execution stats including the number of rows inserted.
    operationId: submitStatement
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.authToken
    - name: X-Snowflake-Authorization-Token-Type
      in: header
      value: $inputs.tokenType
    requestBody:
      contentType: application/json
      payload:
        statement: $inputs.insertStatement
        warehouse: $inputs.warehouse
        database: $inputs.database
        schema: $inputs.schema
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      insertHandle: $response.body#/statementHandle
      numRowsInserted: $response.body#/stats/numRowsInserted
  outputs:
    createHandle: $steps.createTable.outputs.createHandle
    insertHandle: $steps.insertRows.outputs.insertHandle
    numRowsInserted: $steps.insertRows.outputs.numRowsInserted

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/snowflake-create-table-and-insert-via-sql-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.