Schema
List schemas¶
GET/api/v2/databases/{database}/schemas
Lists the accessible schemas.
자세한 내용
SQL 명령 페이지로 이동하여 인자, 옵션, 권한 요구 사항 및 사용 지침에 대한 자세한 정보를 확인할 수 있습니다.
경로 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| 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. |
쿼리 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| 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 | Whether to include dropped schemas that have not yet been purged. Default: `false`. |
응답¶
| 코드 | 설명 |
|---|---|
| 200 | Successful request. |
| 202 | Successfully accepted the request, but it is not completed yet. |
Create a schema¶
POST/api/v2/databases/{database}/schemas
Creates a schema, with modifiers as query parameters. You must provide the full schema definition when creating a schema.
자세한 내용
SQL 명령 페이지로 이동하여 인자, 옵션, 권한 요구 사항 및 사용 지침에 대한 자세한 정보를 확인할 수 있습니다.
쿼리 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| createMode string | Query parameter allowing support for different modes of resource creation. Possible values include:
|
| kind string | Type of schema to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). |
응답¶
| 코드 | 설명 |
|---|---|
| 200 | Successful request. |
| 202 |
Clone a schema¶
POST/api/v2/databases/{database}/schemas/{name}:clone
Clones an existing schema, with modifiers as query parameters. You must provide the full schema definition when cloning an existing schema.
자세한 내용
SQL 명령 페이지로 이동하여 인자, 옵션, 권한 요구 사항 및 사용 지침에 대한 자세한 정보를 확인할 수 있습니다.
쿼리 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| kind string | Type of schema to clone. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). |
| targetDatabase string | Database of the newly created schema. Defaults to the source schema's database. |
응답¶
| 코드 | 설명 |
|---|---|
| 200 | |
| 202 |
Undrop a schema¶
Fetches a schema¶
Create a new, or alters an existing, schema¶
PUT/api/v2/databases/{database}/schemas/{name}
Creates a new, or alters an existing, schema. You must provide the full schema definition even when altering an existing schema.
자세한 내용
SQL 명령 페이지로 이동하여 인자, 옵션, 권한 요구 사항 및 사용 지침에 대한 자세한 정보를 확인할 수 있습니다.
쿼리 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| kind string | Type of schema to create. Currently, Snowflake supports only `transient` and `permanent` (also represented by the empty string). |
응답¶
| 코드 | 설명 |
|---|---|
| 200 | |
| 202 |
Delete a schema¶
DELETE/api/v2/databases/{database}/schemas/{name}
Deletes the specified schema. If you enable the `ifExists` parameter, the operation succeeds even if the schema does not exist. Otherwise, a 404 failure is returned if the schema does not exist. if the drop is unsuccessful.
자세한 내용
SQL 명령 페이지로 이동하여 인자, 옵션, 권한 요구 사항 및 사용 지침에 대한 자세한 정보를 확인할 수 있습니다.
쿼리 매개 변수¶
| 매개 변수 | 설명 |
|---|---|
| ifExists boolean | Query parameter that specifies how to handle the request for a resource that does not exist:
|
| restrict boolean | Whether to drop the schema if foreign keys exist that reference any tables in the schema.
|
응답¶
| 코드 | 설명 |
|---|---|
| 200 | |
| 202 |