Queries the details about fields in a table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetMetaTableColumn

The operation that you want to perform. Set the value to GetMetaTableColumn.

Tid Long No 3***

The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID.

TableGuid String Yes IDB_40753****.qntest2.activity_setting

The globally unique identifier (GUID) of the table in Data Management (DMS).

  • If the database to which the table belongs is a logical database, you can call the ListLogicTables operation to obtain the value of this parameter.
  • If the database to which the table belongs is a physical database, you can call the ListTables operation to obtain the value of this parameter.
RegionId String No cn-hangzhou

The region in which DMS is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
RequestId String 087DFBA1-378B-5D25-B13B-31F6409F****

The ID of the request.

ErrorCode String MissingTableGuid

The error code returned.

ColumnList Array of Column

The details about fields in the table.

ColumnType String bigint(1)

The data type of the field.

Note The returned data type is not unique. For example, the returned data type can be bigint or int.
AutoIncrement Boolean false

Indicates whether the field is an auto-increment field. Valid values:

  • true: The field is an auto-increment field.
  • false: The field is not an auto-increment field.
ColumnId String 63513****

The ID of the field.

ColumnName String has_promotion

The name of the field.

SecurityLevel String INNER

The sensitivity level of the field. Valid values:

  • INNER: The field is not sensitive.
  • SENSITIVE: The field is sensitive.
  • CONFIDENTIAL: The field is confidential.
Note For more information, see Sensitivity levels of fields.
PrimaryKey String true

Indicates whether the field is the primary key. Valid values:

  • true: The field is the primary key.
  • false: The field is not the primary key.
Description String Whether discounts are provided.

The description of the field.

DataPrecision Integer 19

The precision of the field.

DataScale Integer 0

The number of decimal places that the field shows.

Position Integer 1

The position of the field in the table.

Nullable Boolean false

Indicates whether the field can be empty. Valid values:

  • true: The field can be empty.
  • false: The field cannot be empty.
DataLength Long 0

The length of the field.

ErrorMessage String TableGuid is mandatory for this action.

The error message returned.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=GetMetaTableColumn
&TableGuid=IDB_40753****.qntest2.activity_setting
&Tid=3***
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetMetaTableColumnResponse>
    <RequestId>087DFBA1-378B-5D25-B13B-31F6409F****</RequestId>
    <ColumnList>
        <ColumnId>63513****</ColumnId>
        <ColumnName>has_promotion</ColumnName>
        <Description>Whether discounts are provided</Description>
        <ColumnType>bigint(1)</ColumnType>
        <Position>1</Position>
        <AutoIncrement>false</AutoIncrement>
        <SecurityLevel>INNER</SecurityLevel>
        <DataScale>0</DataScale>
        <DataPrecision>19</DataPrecision>
        <PrimaryKey>true</PrimaryKey>
        <Nullable>false</Nullable>
    </ColumnList>
    <ColumnList>
        <ColumnId>63513****</ColumnId>
        <ColumnName>consumption_limit</ColumnName>
        <Description>Consumption amount limit</Description>
        <ColumnType>int(11)</ColumnType>
        <Position>2</Position>
        <AutoIncrement>false</AutoIncrement>
        <SecurityLevel>INNER</SecurityLevel>
        <DataScale>0</DataScale>
        <DataPrecision>10</DataPrecision>
        <PrimaryKey>false</PrimaryKey>
        <Nullable>false</Nullable>
    </ColumnList>
    <ColumnList>
        <ColumnId>63513****</ColumnId>
        <ColumnName>quota</ColumnName>
        <Description>Coupon quota</Description>
        <ColumnType>int(11)</ColumnType>
        <Position>3</Position>
        <AutoIncrement>false</AutoIncrement>
        <SecurityLevel>INNER</SecurityLevel>
        <DataScale>0</DataScale>
        <DataPrecision>10</DataPrecision>
        <PrimaryKey>false</PrimaryKey>
        <Nullable>false</Nullable>
    </ColumnList>
    <Success>true</Success>
</GetMetaTableColumnResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "087DFBA1-378B-5D25-B13B-31F6409F****",
  "ColumnList" : [ {
    "ColumnId" : "63513****",
    "ColumnName" : "has_promotion",
    "Description" : "Whether discounts are provided",
    "ColumnType" : "bigint(1)",
    "Position" : 1,
    "AutoIncrement" : false,
    "SecurityLevel" : "INNER",
    "DataScale" : 0,
    "DataPrecision" : 19,
    "PrimaryKey" : true,
    "Nullable" : false
  }, {
    "ColumnId" : "63513****",
    "ColumnName" : "consumption_limit",
    "Description" : "Consumption amount limit",
    "ColumnType" : "int(11)",
    "Position" : 2,
    "AutoIncrement" : false,
    "SecurityLevel" : "INNER",
    "DataScale" : 0,
    "DataPrecision" : 10,
    "PrimaryKey" : false,
    "Nullable" : false
  }, {
    "ColumnId" : "63513****",
    "ColumnName" : "quota",
    "Description" : "Coupon quota",
    "ColumnType" : "int(11)",
    "Position" : 3,
    "AutoIncrement" : false,
    "SecurityLevel" : "INNER",
    "DataScale" : 0,
    "DataPrecision" : 10,
    "PrimaryKey" : false,
    "Nullable" : false
  } ],
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.