Show Table Data Action

Request

GET /api/show_table_data

Description

Used to get the data size of all tables in all databases under all internal catalog, or the data size of the specified database or table. Unit byte.

Path parameters

NULL

Query parameters

  • db

    Optional. If specified, get the data size of the tables under the specified database.

  • table

    Optional. If specified, get the data size of the specified table.

  • single_replica

    Optional. If specified, get the data size of the single replica of the table.

Request body

NULL

Response

  1. The data size of all tables in the specified database.

    1. {
    2. "msg":"success",
    3. "code":0,
    4. "data":{
    5. "tpch":{
    6. "partsupp":9024548244,
    7. "revenue0":0,
    8. "customer":1906421482
    9. }
    10. },
    11. "count":0
    12. }
  2. The data size of the specified table of the specified db.

    1. {
    2. "msg":"success",
    3. "code":0,
    4. "data":{
    5. "tpch":{
    6. "partsupp":9024548244
    7. }
    8. },
    9. "count":0
    10. }
  3. The data size of the single replica of the specified table of the specified db.

    1. {
    2. "msg":"success",
    3. "code":0,
    4. "data":{
    5. "tpch":{
    6. "partsupp":3008182748
    7. }
    8. },
    9. "count":0
    10. }

Examples

  1. The data size of all tables in the specified database.

    1. GET /api/show_table_data?db=tpch
    2. Response:
    3. {
    4. "msg":"success",
    5. "code":0,
    6. "data":{
    7. "tpch":{
    8. "partsupp":9024548244,
    9. "revenue0":0,
    10. "customer":1906421482
    11. }
    12. },
    13. "count":0
    14. }
  2. The data size of the specified table of the specified db.

    1. GET /api/show_table_data?db=tpch&table=partsupp
    2. Response:
    3. {
    4. "msg":"success",
    5. "code":0,
    6. "data":{
    7. "tpch":{
    8. "partsupp":9024548244
    9. }
    10. },
    11. "count":0
    12. }
  3. The data size of the single replica of the specified table of the specified db.

    1. GET /api/show_table_data?db=tpch&table=partsupp&single_replica=true
    2. Response:
    3. {
    4. "msg":"success",
    5. "code":0,
    6. "data":{
    7. "tpch":{
    8. "partsupp":3008182748
    9. }
    10. },
    11. "count":0
    12. }