getTablesByDatabase
- Print
- PDF
getTablesByDatabase
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Searches for all tables in a specific database with the database name of the user's catalog.
Requests
Request URL
GET {DATA_CATALOG API_URL}/catalogs/{catalog-id}/databases/{database-name}/tables
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
catalogId | Yes | String | Unique catalog ID (ref: getCatalogs) | |
databaseName | Yes | String | Database name | |
pageNo | No | int | Page number Default: 1 | |
pageSize | No | int | Maximum: 200 | size of result list Default: 20 |
Request header
Request examples
curl -X GET "https://datacatalog.apigw.ntruss.com/api/v1/catalogs/{catalog-id}/databases/{database-name}/tables?pageNo=1&pageSize=20" \
-H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
-H "x-ncp-iam-access-key: {x-ncp-iam-access-key}" \
-H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
Responses
Response bodies
- tableResponseList: list of tables in the user’s catalog
Item | Type | Description |
---|---|---|
catalogId | Int | Unique catalog ID |
tableName | String | Table name |
databaseName | String | Database name |
scannerId | Int | Unique scanner ID |
location | String | Position of table |
dataFormat | String | Data format of table |
version | Int | Version of table |
createTime | Date | Table creation date and time |
updateTime | Date | Table modification date and time |
Response examples
HTTP
HTTP Status | Description |
---|---|
200 | OK |
JSON
{
"pageNo": 1,
"pageSize": 20,
"totalCount": 1,
"requestId": "4899965b-6454-40e3-983f-38a58406fed7",
"tableResponseList": [
{
"catalogId": 2144,
"tableName": "scan_dir",
"databaseName": "default",
"scannerId": 0,
"location": "s3a://bububu/scan-dir/",
"dataFormat": "csv",
"version": 0,
"createTime": "2023-03-29T14:12:37+0900",
"updateTime": "2023-06-02T14:01:30+0900"
}
]
}
Was this article helpful?