Table

List tables

GET/api/v2/databases/{database}/schemas/{schema}/tables
Lists the tables under the database and schema.

パスパラメータ

パラメーター説明
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.

クエリパラメーター

パラメーター説明
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.

応答

コード説明
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.

クエリパラメーター

パラメーター説明
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.
copyGrants boolean
Query parameter to enable copy grants when creating the object.

応答

コード説明
200
Successful request.
202

Create a table using the result of the specified select query (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:as_select
Create a table as select.

クエリパラメーター

パラメーター説明
query string
The SQL select query to run to set up the table values (and possibly columns).

応答

コード説明
200
202

Create a table using the result of the specified select query

POST/api/v2/databases/{database}/schemas/{schema}/tables:as-select
Create a table as select.

クエリパラメーター

パラメーター説明
query string
The SQL select query to run to set up the table values (and possibly columns).

応答

コード説明
200
202

Create a table using the templates specified in staged files (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:using_template
Create a table using template.

クエリパラメーター

パラメーター説明
query string
The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table.

応答

コード説明
200
202

Create a table using the templates specified in staged files

POST/api/v2/databases/{database}/schemas/{schema}/tables:using-template
Create a table using template.

クエリパラメーター

パラメーター説明
query string
The SQL query that uses INFER_SCHEMA on staged files to set the column definitions for the new table.

応答

コード説明
200
202

Fetch a table

GET/api/v2/databases/{database}/schemas/{schema}/tables/{name}
Fetch a Table using the describe command output.

パスパラメータ

パラメーター説明
name 
Identifier (i.e. name) for the resource.

応答

コード説明
200
successful
202

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.

応答

コード説明
200
202

Delete a table

DELETE/api/v2/databases/{database}/schemas/{schema}/tables/{name}
Delete a table with the given name.

クエリパラメーター

パラメーター説明
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.

応答

コード説明
200
202

Clone table

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:clone
Create a new table by cloning from the specified resource

クエリパラメーター

パラメーター説明
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.

応答

コード説明
200
202

Create a table like this existing one (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:create_like
Create a new table like the specified resource, but empty

クエリパラメーター

パラメーター説明
newTableName string
The name of the table to be created.

応答

コード説明
200
202

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

応答

コード説明
200
202

Undrop a table

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:undrop
Undrop specified table

応答

コード説明
200
202

Suspend recluster of a table (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:suspend_recluster
Suspend recluster of a table

応答

コード説明
200
202

Suspend recluster of a table

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:suspend-recluster
Suspend recluster of a table

応答

コード説明
200
202

Resume recluster of a table (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:resume_recluster
Resume recluster of a table

応答

コード説明
200
202

Resume recluster of a table

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:resume-recluster
Resume recluster of a table

応答

コード説明
200
202

Swap with another table (Deprecated)

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:swapwith
Swap with another table

クエリパラメーター

パラメーター説明
targetTableName string
The fully-specified name of the target table to be swapped with.

応答

コード説明
200
202

Swap with another table

POST/api/v2/databases/{database}/schemas/{schema}/tables/{name}:swap-with
Swap with another table

クエリパラメーター

パラメーター説明
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.

応答

コード説明
200
202