Table
List tables¶
GET/api/v2/databases/{database}/schemas/{schema}/tables
Lists the tables under the database and schema.
Path Parameters¶
Parameter | Description |
---|---|
database | Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. |
schema | Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. |
Query Parameters¶
Parameter | Description |
---|---|
like string | Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. |
startsWith string | Query parameter to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. |
showLimit integer | Query parameter to limit the maximum number of rows returned by a command. |
fromName string | Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. |
history boolean | Optionally includes dropped tables that have not yet been purged. |
deep boolean | Optionally includes dependency information of the table. |
Response¶
Code | Description |
---|---|
200 | successful |
202 | Successfully accepted the request, but it is not completed yet. |
Create a table (clone and undrop are separate subresources)¶
POST/api/v2/databases/{database}/schemas/{schema}/tables
Create a table.
Query Parameters¶
Parameter | Description |
---|---|
createMode string | Query parameter allowing support for different modes of resource creation. Possible values include:
|
copyGrants boolean | Query parameter to enable copy grants when creating the object. |
Response¶
Code | Description |
---|---|
200 | Successful request. |
202 |
Create a table using the result of the specified select query (Deprecated)¶
Create a table using the result of the specified select query¶
Create a table using the templates specified in staged files (Deprecated)¶
Create a table using the templates specified in staged files¶
Fetch a table¶
Create a (or alter an existing) table¶
PUT/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.
Response¶
Code | Description |
---|---|
200 | |
202 |
Delete a table¶
DELETE/api/v2/databases/{database}/schemas/{schema}/tables/{name}
Delete a table with the given name.
Query Parameters¶
Parameter | Description |
---|---|
ifExists boolean | Query parameter that specifies how to handle the request for a resource that does not exist:
|
Response¶
Code | Description |
---|---|
200 | |
202 |
Clone table¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:clone
Create a new table by cloning from the specified resource
Query Parameters¶
Parameter | Description |
---|---|
targetDatabase string | Database of the newly created table. Defaults to the source table's database. |
targetSchema | Schema of the newly created table. Defaults to the source table's schema. |
Response¶
Code | Description |
---|---|
200 | |
202 |
Create a table like this existing one (Deprecated)¶
Create a table like this existing one¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:create-like
Create a new table like the specified resource, but empty
Response¶
Code | Description |
---|---|
200 | |
202 |
Undrop a table¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:undrop
Undrop specified table
Response¶
Code | Description |
---|---|
200 | |
202 |
Suspend recluster of a table (Deprecated)¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:suspend_recluster
Suspend recluster of a table
Response¶
Code | Description |
---|---|
200 | |
202 |
Suspend recluster of a table¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:suspend-recluster
Suspend recluster of a table
Response¶
Code | Description |
---|---|
200 | |
202 |
Resume recluster of a table (Deprecated)¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:resume_recluster
Resume recluster of a table
Response¶
Code | Description |
---|---|
200 | |
202 |
Resume recluster of a table¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:resume-recluster
Resume recluster of a table
Response¶
Code | Description |
---|---|
200 | |
202 |
Swap with another table (Deprecated)¶
Swap with another table¶
POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:swap-with
Swap with another table
Query Parameters¶
Parameter | Description |
---|---|
targetName | The name of the target table to be swapped with. |
targetDatabase | Database of the target table. Defaults to the source table's database. |
targetSchema | Schema of the target table. Defaults to the source table's schema. |
Response¶
Code | Description |
---|---|
200 | |
202 |