Create a (or alter an existing) table.
PUT {{baseUrl}}/api/v2/databases/:database/schemas/:schema/tables/:name
Create a (or alter an existing) table. Even if the operation is just an alter, the full property set must be provided.
Request Body
{"name"=>"<string>", "kind"=>"PERMANENT", "cluster_by"=>["<string>", "<string>"], "enable_schema_evolution"=>"<boolean>", "change_tracking"=>"<boolean>", "data_retention_time_in_days"=>"<integer>", "max_data_extension_time_in_days"=>"<integer>", "default_ddl_collation"=>"<string>", "columns"=>[{"name"=>"<string>", "datatype"=>"<string>", "nullable"=>true, "collate"=>"<string>", "default"=>"<string>", "autoincrement"=>"<boolean>", "autoincrement_start"=>"<integer>", "autoincrement_increment"=>"<integer>", "constraints"=>[{"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}, {"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}], "comment"=>"<string>"}, {"name"=>"<string>", "datatype"=>"<string>", "nullable"=>true, "collate"=>"<string>", "default"=>"<string>", "autoincrement"=>"<boolean>", "autoincrement_start"=>"<integer>", "autoincrement_increment"=>"<integer>", "constraints"=>[{"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}, {"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}], "comment"=>"<string>"}], "constraints"=>[{"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}, {"name"=>"<string>", "column_names"=>["<string>", "<string>"], "constraint_type"=>"<string>"}], "comment"=>"<string>", "created_on"=>"<dateTime>", "database_name"=>"<string>", "schema_name"=>"<string>", "rows"=>"<long>", "bytes"=>"<long>", "owner"=>"<string>", "dropped_on"=>"<dateTime>", "automatic_clustering"=>"<boolean>", "search_optimization"=>"<boolean>", "search_optimization_progress"=>"<long>", "search_optimization_bytes"=>"<long>", "owner_role_type"=>"<string>", "budget"=>"<string>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status":"\u003cstring\u003e"}