Creates a schema.

POST {{baseUrl}}/api/v2/databases/:database/schemas?createMode=errorIfExists&kind=

Creates a schema, with modifiers as query parameters. You must provide the full schema definition when creating a schema.

Request Params

KeyDatatypeRequiredDescription
createModestringQuery 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. | | kind | null | | Type of schema to create. Currently, Snowflake supports only transient and permanent (also represented by the empty string). |

Request Body

{"name"=>"VKw97w4S60y", "created_on"=>"<dateTime>", "kind"=>"PERMANENT", "is_default"=>"<boolean>", "is_current"=>"<boolean>", "database_name"=>"<string>", "owner"=>"<string>", "comment"=>"<string>", "options"=>"<string>", "managed_access"=>false, "retention_time"=>"<integer>", "dropped_on"=>"<dateTime>", "owner_role_type"=>"<string>", "budget"=>"<string>", "data_retention_time_in_days"=>"<integer>", "default_ddl_collation"=>"<string>", "log_level"=>"<string>", "pipe_execution_paused"=>"<boolean>", "max_data_extension_time_in_days"=>"<integer>", "suspend_task_after_num_failures"=>"<integer>", "trace_level"=>"<string>", "user_task_managed_initial_warehouse_size"=>"<string>", "user_task_timeout_ms"=>"<integer>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:&quot;\u003cstring\u003e&quot;}