Table Row Count Action

Request

GET /api/<db>/<table>/_count

Description

Used to obtain statistics about the number of rows in a specified table. This interface is currently used in Spark-Doris-Connector. Spark obtains Doris table statistics.

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. "size": 1,
  6. "status": 200
  7. },
  8. "count": 0
  9. }

The data.size field indicates the number of rows in the specified table.

Examples

  1. Get the number of rows in the specified table.

    1. GET /api/db1/tbl1/_count
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "size": 1,
    8. "status": 200
    9. },
    10. "count": 0
    11. }