Table Schema Action
Request
GET /api/<db>/<table>/_schema
Description
用于获取指定表的表结构信息。该接口目前用于 Spark-Doris-Connector 中,Spark 获取 Doris 的表结构信息。
Path parameters
<db>
指定数据库
<table>
指定表
Query parameters
无
Request body
无
Response
{
"msg": "success",
"code": 0,
"data": {
"properties": [{
"type": "INT",
"name": "k1",
"comment": "",
"aggregation_type":""
}, {
"type": "INT",
"name": "k2",
"comment": "",
"aggregation_type":"MAX"
}],
"status": 200
},
"count": 0
}
Examples
获取指定表的表结构信息。
GET /api/db1/tbl1/_schema
Response:
{
"msg": "success",
"code": 0,
"data": {
"properties": [{
"type": "INT",
"name": "k1",
"comment": ""
}, {
"type": "INT",
"name": "k2",
"comment": ""
}],
"status": 200
},
"count": 0
}