このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Describing the Table Information

Updated on 2022-12-07 GMT+08:00

Function

This API is used to describe metadata information in the specified table.

URI

  • URI format

    GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

    database_name

    Yes

    String

    Name of the database where the target table resides.

    table_name

    Yes

    String

    Name of the target table.

Request

None

Response

Table 2 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

Yes

String

System prompt. If execution succeeds, the parameter setting may be left blank.

column_count

Yes

Integer

Total number of columns in the table.

columns

Yes

Array of Objects

Column information, including the column name, type, and description. For details, see Table 3.

table_type

Yes

String

Table type. The options are as follows:

MANAGED: DLI table

EXTERNAL: OBS table

VIEW: view

data_type

No

String

Data type, including CSV, Parquet, ORC, JSON, and Avro.

data_location

No

String

Path for storing data, which is an OBS path.

storage_properties

No

Array of Objects

Storage attribute, which is in the format of key/value and includes parameters delimiter, escape, quote, header, dateformat, and timestampformat.

table_comment

No

String

Table comment.

create_table_sql

No

String

Statement used to create a table.

Table 3 columns parameters

Parameter

Mandatory

Type

Description

column_name

Yes

String

Column name.

description

Yes

String

Description of a column.

type

Yes

String

Data type of a column.

is_partition_column

Yes

Boolean

Indicates whether the column is a partition column. The value true indicates that the column is a partition column, and the value false indicates that the column is not a partition column. The default value is false.

Example Request

None

Example Response

  • MANAGED type table
    {
      "is_success": true,
      "message": "",
      "column_count": 3,
      "columns": [
        {
          "column_name": "id",
          "description": "",
          "type": "int",
          "is_partition_column": false
        },
        {
          "column_name": "name",
          "description": "",
          "type": "string",
          "is_partition_column": false
        },
        {
          "column_name": "level",
          "description": "",
          "type": "string",
          "is_partition_column": true
        }
      ],
        "table_type":"MANAGED"
    }
  • EXTERNAL type table
    {
        "is_success": true,
        "message": "",
        "column_count": 2,
        "columns": [
            {
                "type": "string",
                "description": "",
                "column_name": "col2",
                "is_partition_column": false
            },
            {
                "type": "string",
                "description": "",
                "column_name": "col1",
                "is_partition_column": true
            }
        ],
        "table_type": "EXTERNAL",
        "data_type": "parquet",
        "data_location": "obs://obs-wangtao/savepoint/savepoint-d95437-039668840fff/_metadata",
        "storage_properties": [
            {
                "key": "timestampformat",
                "value": "yyyy-MM-dd HH:mm:ss"
            },
            {
                "key": "quote",
                "value": "\""
            },
            {
                "key": "dateformat",
                "value": "yyyy-MM-dd"
            },
            {
                "key": "escape",
                "value": "\\"
            },
            {
                "key": "header",
                "value": "false"
            },
            {
                "key": "delimiter",
                "value": ","
            }
        ],
        "table_comment": "",
         "create_table_sql": "CREATE TABLE `default`.`wan_test` (`col2` STRING, `col1` STRING)\nUSING parquet\nOPTIONS (\n  `timestampformat` 'yyyy-MM-dd HH:mm:ss',\n  `quote` '\"',\n  `dateformat` 'yyyy-MM-dd',\n  `escape` '\\\\',\n  `header` 'false',\n  `delimiter` ','\n)\nPARTITIONED BY (col1)\nCOMMENT ''\nLOCATION 'obs://obs-wangtao/savepoint/savepoint-d95437-039668840fff/_metadata'\nTBLPROPERTIES (\n  'hive.serialization.extend.nesting.levels' = 'true'\n)\n"
       }
  • VIEW type table
    {
      "is_success": true,
      "message": "",
      "column_count": 3,
      "columns": [
        {
          "column_name": "id",
          "description": "",
          "type": "int",
          "is_partition_column": false
        },
        {
          "column_name": "name",
          "description": "",
          "type": "string",
          "is_partition_column": false
        },
        {
          "column_name": "level",
          "description": "",
          "type": "string",
          "is_partition_column": true
        }
      ],
      "table_type":"VIEW",
      "create_table_sql": "CREATE VIEW `default`.`view1`(id, name) AS\nselect * from a_gff.testtable\n"
    }

Status Codes

Table 4 describes the status code.

Table 4 Status codes

Status Code

Description

200

The operation is successful.

400

Request error.

500

Internal service error.

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback