Queries metadata tables in Data Lake Formation (DLF).

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 headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

GET /api/metastore/databases/tables/list 

Request parameters

Parameter Type Position Required Example Description
CatalogId String Query No 1344371

The catalog ID of the metadatabase. Default value: the user ID of your Alibaba Cloud account.

TableNamePattern String Query No .*

The regular expression that is used to match the names of metadata tables.

NextPageToken String Query No ''

The pagination token. The token is returned in the return results. If no pagination token is returned, set this parameter to an empty string.

PageSize Integer Query No 10

The number of entries to return on each page.

DatabaseName String Query No database_test

The name of the metadatabase.

TableType String Query No MANAGED_TABLE

The type of the metadata table, such as MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW, INDEX_TABLE, or MATERIALIZED_VIEW.

RegionId String Host No cn-hangzhou

The ID of the region where DLF is activated.

Response parameters

Parameter Type Example Description
Code String OK

The description of the status code.

Message String .

The error message that is returned.

NextPageToken String 2cb472ec1bf84f8d92f9c4baa0d21c19aa

The pagination token.

RequestId String B7F4B621-E41E-4C84-B97F-42B5380A32BB

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

Tables Array of Table

The list of metadata tables.

Error codes

InternalError: An internal error has occurred. Troubleshoot the error based on the error message that is returned.

Examples

Sample requests

GET /api/metastore/databases/tables/list HTTP/1.1 
 {
    "TableType":"MANAGED_TABLE",
    "PageSize":"10",
    "TableNamePattern":".*",
    "NextPageToken":"''",
    "DatabaseName":"database_test",
    "RegionId":"cn-hangzhou",
    "CatalogId":"1344371"
}

Sample success responses

JSON format

{
  "Success": true,
  "Code": "OK",
  "Message": "",
  "HttpStatusCode": 200,
  "NextPageToken": "2cb472ec1bf84f8d92f9c4baa0d21c19aa",
  "RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
  "Tables": [
    {
      "Cascade": false,
      "TableName": "test_table_20200715162543389",
      "DatabaseName": "hivedb",
      "TableType": "MANAGED_TABLE",
      "Description": "",
      "Retention": 365,
      "Sd": {
        "Cols": [
          {
            "Comment": "user_name",
            "Name": "name",
            "Type": "string",
            "Parameters": {}
          }
        ],
        "Compressed": false,
        "InputFormat": "input",
        "Location": "",
        "NumBuckets": 5,
        "OutputFormat": "output",
        "Parameters": {},
        "SerDeInfo": {
          "Name": "",
          "SerializationLib": "",
          "Parameters": {}
        },
        "SkewedInfo": {
          "SkewedColNames": [],
          "SkewedColValues": [],
          "SkewedColValueLocationMaps": {}
        },
        "BucketCols": [
          "col1"
        ],
        "SortCols": [
          {
            "Order": 0,
            "Col": "col"
          }
        ],
        "StoredAsSubDirectories": false
      },
      "PartitionKeys": [
        {
          "Comment": "comment_day",
          "Name": "day",
          "Type": "int",
          "Parameters": {}
        }
      ],
      "Parameters": {},
      "ViewOriginalText": "",
      "ViewExpandedText": "",
      "CreatedBy": "",
      "Privileges": {},
      "RewriteEnabled": true,
      "Temporary": false,
      "OwnerType": {},
      "CreateTime": 0,
      "UpdateTime": 0,
      "LastAccessTime": 0,
      "LastAnalyzedTime": 0
    }
  ]
}

Error codes

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