Warehouse

Create or replace a warehouse

POST/api/v2/warehouses
Create a virtual warehouse. Equivalent to CREATE WAREHOUSE in SQL.

Query Parameters

ParameterDescription
createMode string
Query parameter allowing support for different modes of resource creation. Possible values include:
  • errorIfExists: Throws an error if you try to create a resource that already exists.
  • orReplace: Automatically replaces the existing resource with the current one.
  • ifNotExists: Creates a new resource when an alter is requested for a non-existent resource.

Response

CodeDescription
200
Successful request.
202

List warehouses

GET/api/v2/warehouses
Show a list of warehouse filtered by pattern. Equivalent to SHOW WAREHOUSE in SQL.

Query Parameters

ParameterDescription
like string
Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.

Response

CodeDescription
200
successful
202
Successfully accepted the request, but it is not completed yet.

Describe a warehouse

GET/api/v2/warehouses/{name}
Describes the warehouse, show information of the chosen warehouse. Equivalent to DESCRIBE WAREHOUSE in SQL.

Path Parameters

ParameterDescription
name 
Identifier (i.e. name) for the resource.

Response

CodeDescription
200
successful
202

Drop a warehouse

DELETE/api/v2/warehouses/{name}
Removes the specified virtual warehouse from the system. Equivalent to DROP WAREHOUSE in SQL.

Query Parameters

ParameterDescription
ifExists boolean
Query parameter that specifies how to handle the request for a resource that does not exist:
  • true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource.
  • false: The endpoint throws an error if the resource doesn't exist.

Response

CodeDescription
200
202

Create a new (or alter an existing) warehouse

PUT/api/v2/warehouses/{name}
Create a (or alter an existing) warehouse. Even if the operation is just an alter, the full property set must be provided.

Response

CodeDescription
200
202

Resume a suspended warehouse

POST/api/v2/warehouses/{name}:resume
Bring current warehouse to a usable ‘Running’ state by provisioning compute resources if current warehouse is suspended.

Response

CodeDescription
200
202

Suspend a warehouse

POST/api/v2/warehouses/{name}:suspend
Remove all compute nodes from a warehouse and put the warehouse into a ‘Suspended’ state if current warehouse is not suspended.

Response

CodeDescription
200
202

Update and rename a warehouse

POST/api/v2/warehouses/{name}:rename
Specifies a new identifier for the warehouse; must be unique for current account.

Response

CodeDescription
200
202

Abort all queries

POST/api/v2/warehouses/{name}:abort
Aborts all the queries currently running or queued on the warehouse.

Response

CodeDescription
200
202

Use current warehouse for the session (Deprecated)

POST/api/v2/warehouses/{name}:use
[Deprecated] Specifies the active/current warehouse for the session.

Response

CodeDescription
200
202