tencent cloud

文档反馈

DescribeTablesName

最后更新时间:2024-08-08 15:32:37

1. API Description

Domain name for API request: dlc.tencentcloudapi.com.

This API is used to query the data table name list.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeTablesName.
Version Yes String Common Params. The value used for this API: 2021-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
DatabaseName Yes String List all the data tables in the database.
Limit No Integer Quantity of returns. It is 10 by default, and the maximum value is 100.
Offset No Integer Data offset. It starts from 0 and is 0 by default.
Filters.N No Array of Filter Filter criteria. The following filter types are supported. The Name should be one of them.
Table-name - String - (filter criteria) data table name, such as table-001.
table-id - String - (filter criteria) table id, such as 12342.
DatasourceConnectionName No String Specified data source name to be queried, and it is DataLakeCatalog by default.
StartTime No String Start time: It is used to filter the update time, and the format is yyyy-mm-dd HH:MM:SS.
EndTime No String End time: It is used to filter the update time, and the format is yyyy-mm-dd HH:MM:SS.
Sort No String Sorting fields, and they support CreateTime (creation time), UpdateTime (update time), StorageSize (storage space), RecordCount (number of rows), and Name (table name) (The ascending order according to names will be adopted if it is not passed).
Asc No Boolean Sorting fields, and false means the descending order (by default) while true means the ascending order.
TableType No String Table type, query of the table type, and the available value is EXTERNAL_TABLE,INDEX_TABLE,MANAGED_TABLE,MATERIALIZED_VIEW,TABLE,VIEW,VIRTUAL_VIEW
TableFormat No String Filter fields - table format: If no criteria are specified, all the items will be checked; LAKEFS: managed table; ICEBERG: non-managed iceberg table; HIVE: non-managed hive table; OTHER: other non-managed tables.

3. Output Parameters

Parameter Name Type Description
TableNameList Array of String Object list of data table names
TotalCount Integer Total instances
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying the Data Table Name List

Input Example

POST / HTTP/1.1
Host: dlc.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTablesName
<Common request parameters>

{
    "Limit": 0,
    "Offset": 1,
    "DatabaseName": "abc",
    "Filters": [
        {
            "Name": "abc",
            "Values": [
                "abc"
            ]
        }
    ],
    "DatasourceConnectionName": "abc",
    "StartTime": "abc",
    "EndTime": "abc",
    "Sort": "abc",
    "Asc": true,
    "TableType": "abc",
    "TableFormat": "abc"
}

Output Example

{
    "Response": {
        "TableNameList": [
            "abc"
        ],
        "TotalCount": 1,
        "RequestId": "abc"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation The operation failed.
InternalError An internal error occurred.
InvalidParameter The parameter is incorrect.
ResourceNotFound.DatasourceNotFound The data source connection does not exist. Please try again or submit a ticket to contact us.