tencent cloud

Feedback

DescribeColumnsMeta

Last updated: 2024-06-24 16:59:00

1. API Description

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

Query all column metadata of the table

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: DescribeColumnsMeta.
Version Yes String Common Params. The value used for this API: 2021-08-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
TableId Yes String Table ID
PageNumber Yes Integer Page Number
PageSize Yes Integer Page Size
FilterSet.N No Array of Filter Filter
OrderFieldSet.N No Array of OrderField Sort Fields
IsPartitionQuery No Boolean Whether to Query Partition Field, Default false
ComplianceId No Integer Compliance Group ID

3. Output Parameters

Parameter Name Type Description
ColumnMetaSet Array of ColumnMeta Pagination return
Note: This field may return null, indicating that no valid value can be obtained.
TotalCount Integer Number of records
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 Failure

Failure

Input Example

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

{
    "TableId": "111",
    "PageNumber": 1,
    "PageSize": 1
}

Output Example

{
    "Response": {
        "Error": {
            "Code": "FailedOperation",
            "Message": "DescribeColumnsMeta encountered an error, reason: MetaDataClient.describeColumnPageByTableName interface encountered an error."
        },
        "RequestId": "9eba5f8a-8cf5-4ce1-a557-b5d8e624a9b9"
    }
}

Example2 Failure 2

Failure 2

Input Example

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

{
    "TableId": "1",
    "PageNumber": 1,
    "PageSize": 1
}

Output Example

{
    "Response": {
        "Error": {
            "Code": "FailedOperation",
            "Message": "DescribeColumnsMeta encountered an error, reason: MetaDataClient.describeColumnPageByTableName interface encountered an error."
        },
        "RequestId": "964be7a0-7dde-4a2f-8a53-fa60524f87f8"
    }
}

Example3 Query all column metadata of the table

Input Example

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

{
    "TableId": "abc",
    "PageNumber": 0,
    "PageSize": 0,
    "FilterSet": [
        {
            "Name": "abc",
            "Values": [
                "abc"
            ]
        }
    ],
    "OrderFieldSet": [
        {
            "Name": "abc",
            "Direction": "abc"
        }
    ],
    "IsPartitionQuery": true,
    "ComplianceId": 0
}

Output Example

{
    "Response": {
        "ColumnMetaSet": [
            {
                "NameEn": "abc",
                "NameCn": "abc",
                "Type": "abc",
                "Description": "abc",
                "Position": 0,
                "IsPartition": true,
                "Name": "abc",
                "ColumnFamiliesFieldSet": [
                    {
                        "Key": "abc",
                        "Value": "abc"
                    }
                ],
                "DictionaryId": "abc",
                "DictionaryName": "abc",
                "LevelName": "abc",
                "LevelRank": 0
            }
        ],
        "TotalCount": 0,
        "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
AuthFailure CAM Signature/Authentication Error.
AuthFailure.SignatureExpire Not logged in or login has expired.
FailedOperation Operation Failure.
InternalError An internal error occurs.
InvalidParameter Parameter error.
ResourceNotFound The resource does not exist.