All Products
Search
Document Center

AnalyticDB:GetTable

Last Updated:Nov 10, 2025

Queries the information about a table.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
adb:getTableget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DbNamestringYes

The name of the database.

dbName
TableNamestringYes

The name of the table.

tableName
DBClusterIdstringYes

The ID of the cluster.

amv-*******
RegionIdstringYes

The ID of the region in which the cluster resides.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

1AD222E9-E606-4A42-BF6D-8A4442913CEF
Codelong

The error code returned.

0
Messagestring

The error message returned.

""
Successboolean

Indicates whether the query succeeded.

true
TableTableModel

The information about the table.

Examples

Sample success responses

JSONformat

{
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "Code": 0,
  "Message": "",
  "Success": true,
  "Table": {
    "TblId": 123,
    "DbName": "example",
    "TableName": "tableName",
    "TableType": "external_table",
    "PartitionKeys": [
      {
        "Name": "name",
        "Type": "long",
        "Comment": "comment",
        "DatabaseName": "databaseName",
        "TableName": "tableName",
        "MappedName": "mappedName",
        "DataType": "long",
        "CreateTime": "2023-01-05 13:17:55",
        "UpdateTime": "2023-01-05 13:17:55",
        "PkPosition": -1,
        "IsPartitionKey": false,
        "OrdinalPosition": -1,
        "ColumnRawName": "ColumnRawName",
        "PhysicalColumnName": "PhysicalColumnName",
        "Nullable": true,
        "AutoIncrement": true,
        "Precision": 1,
        "Scale": 1,
        "Primarykey": true,
        "DefaultValue": "default",
        "Tokenizer": "tokenizer",
        "Encode": "encode",
        "Compression": "compression",
        "Delimiter": "delimiter",
        "ValueType": "valueType",
        "CompressFloatUseShort": false,
        "OnUpdate": "onUpdate"
      }
    ],
    "Parameters": {
      "key": "key:value"
    },
    "Sd": {
      "SdId": 1,
      "Location": "oss://**************",
      "InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
      "OutputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
      "Compressed": false,
      "NumBuckets": 1,
      "SerDeInfo": {
        "SerDeId": 123,
        "Name": "example",
        "Parameters": {
          "key": "key:value"
        },
        "SerializationLib": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
      },
      "Parameters": {
        "key": "key:value"
      },
      "StoredAsSubDirectories": false
    },
    "CreateTime": "2023-01-05 13:17:55",
    "ViewOriginalText": "ViewOriginalText",
    "ViewExpandedText": "ViewExpandedText",
    "Temporary": false,
    "Comment": "description",
    "Cols": [
      {
        "Name": "name",
        "Type": "long",
        "Comment": "comment",
        "DatabaseName": "databaseName",
        "TableName": "tableName",
        "MappedName": "mappedName",
        "DataType": "long",
        "CreateTime": "2023-01-05 13:17:55",
        "UpdateTime": "2023-01-05 13:17:55",
        "PkPosition": -1,
        "IsPartitionKey": false,
        "OrdinalPosition": -1,
        "ColumnRawName": "ColumnRawName",
        "PhysicalColumnName": "PhysicalColumnName",
        "Nullable": true,
        "AutoIncrement": true,
        "Precision": 1,
        "Scale": 1,
        "Primarykey": true,
        "DefaultValue": "default",
        "Tokenizer": "tokenizer",
        "Encode": "encode",
        "Compression": "compression",
        "Delimiter": "delimiter",
        "ValueType": "valueType",
        "CompressFloatUseShort": false,
        "OnUpdate": "onUpdate"
      }
    ],
    "DistributeColumns": [
      {
        "Name": "name",
        "Type": "long",
        "Comment": "comment",
        "DatabaseName": "databaseName",
        "TableName": "tableName",
        "MappedName": "mappedName",
        "DataType": "long",
        "CreateTime": "2023-01-05 13:17:55",
        "UpdateTime": "2023-01-05 13:17:55",
        "PkPosition": -1,
        "IsPartitionKey": false,
        "OrdinalPosition": -1,
        "ColumnRawName": "ColumnRawName",
        "PhysicalColumnName": "PhysicalColumnName",
        "Nullable": true,
        "AutoIncrement": true,
        "Precision": 1,
        "Scale": 1,
        "Primarykey": true,
        "DefaultValue": "default",
        "Tokenizer": "tokenizer",
        "Encode": "encode",
        "Compression": "compression",
        "Delimiter": "delimiter",
        "ValueType": "valueType",
        "CompressFloatUseShort": false,
        "OnUpdate": "onUpdate"
      }
    ],
    "PhysicalTableName": "physicalTableName",
    "PhysicalDatabaseName": "physicalDatabaseName",
    "DistributeType": "DistributeType",
    "PartitionType": "PartitionType",
    "PartitionColumn": "colName",
    "PartitionCount": 16,
    "PreviousVersion": 1,
    "CurrentVersion": 2,
    "UpdateTime": "2023-01-05 13:17:55",
    "TableEngineName": "hive",
    "IsAllIndex": true,
    "BlockSize": 64,
    "Compression": "Compression",
    "RawTableName": "RawTableName",
    "SubpartitionType": "SubpartitionColumn",
    "SubpartitionColumn": "SubpartitionColumn",
    "SubpartitionCount": 64,
    "ArchiveType": "ArchiveType",
    "MaxColumnId": 0,
    "EnableDfs": false,
    "StoragePolicy": "StoragePolicy",
    "HotPartitionCount": 32,
    "IsFulltextDict": false,
    "RtIndexAll": false,
    "RouteColumns": [],
    "RtEngineType": "RtEngineType",
    "RtModeType": "RtModeType",
    "RouteType": "routeType",
    "DictEncode": false,
    "BucketCount": 16,
    "Bucket": 16,
    "ViewSecurityMode": "ViewSecurityMode",
    "Indexes": [
      {
        "DatabaseName": "exampleDatabase",
        "PhysicalTableName": "physicalDatabase",
        "IndexName": "indexName",
        "IndexType": "NORMAL",
        "IndexColumns": [],
        "ColumnOrds": [
          "ASC/DESC"
        ],
        "Options": {
          "key": "key:value"
        },
        "CreateTime": "2023-01-05 13:17:55",
        "UpdateTime": "2023-01-05 13:17:55"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MDS.IllegalArgumentInvalid argument.An invalid parameter is used.
400MDS.InvalidPrivilegeNo permissions.You are not authorized to perform this operation.
400MDS.MetaSchemaAlreadyExistThe database already exists.The specified database already exists.
400MDS.MetaSchemaNotExistThe database does not exist.The specified database does not exist.
400MDS.MetaTableAlreadyExistThe table already exists.The specified table already exists.
400MDS.MetaTableNotExistThe table is not found.The specified table does not exist.
403MDS.RamAuthAccessDeniedram auth access denied.RAM authentication failed
500MDS.InternalErrorAn internal MDS error occurred.An internal error occurred.
500MDS.MetaVisitErrorFailed to access metadata.Failed to access the metadata.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-18The API operation is not deprecated.. The Error code has changedView Change Details
2023-12-21The Error code has changedView Change Details
2023-10-19The API operation is deprecated. The Error code has changedView Change Details
2023-03-22The Error code has changedView Change Details