Table Schema Action

Request

GET /api/<db>/<table>/_schema

Description

Used to obtain the table structure information of the specified table. This interface is currently used in Spark-Doris-Connector. Spark obtains Doris table structure information.

Path parameters

  • <db>

    Specify database

  • <table>

    Specify table

Query parameters

None

Request body

None

Response

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "properties": [{
  6. "type": "INT",
  7. "name": "k1",
  8. "comment": ""
  9. }, {
  10. "type": "INT",
  11. "name": "k2",
  12. "comment": ""
  13. }],
  14. "status": 200
  15. },
  16. "count": 0
  17. }

Examples

  1. Get the table structure information of the specified table.

    1. GET /api/db1/tbl1/_schema
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "properties": [{
    8. "type": "INT",
    9. "name": "k1",
    10. "comment": ""
    11. }, {
    12. "type": "INT",
    13. "name": "k2",
    14. "comment": ""
    15. }],
    16. "status": 200
    17. },
    18. "count": 0
    19. }