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

  1. Response:
  2. {
  3. "msg": "success",
  4. "code": 0,
  5. "data": {
  6. "size": 1,
  7. "status": 200
  8. },
  9. "count": 0
  10. } ```