---
title: "(BETA) Retrieve stored physical statistics for a data source"
method: GET
path: "/api/v1/layout/dataSources/{dataSourceId}/statistics"
tags: ["Other"]
---

# (BETA) Retrieve stored physical statistics for a data source

`GET /api/v1/layout/dataSources/{dataSourceId}/statistics`

## Request

- Base URL: `https://www.gooddata.ai`
- URL: `https://www.gooddata.ai/api/v1/layout/dataSources/{dataSourceId}/statistics`
- Auth: none declared

(BETA) Returns previously stored physical table and column statistics. Supports optional filtering by schema and table name.

## Path parameters

- `dataSourceId` string, required

## Query parameters

- `schemaName` string
- `tableName` string

## Response `200`

OK

- DataSourceStatisticsResponse
  - `tables` TableStatisticsEntry[], required
    - `columns` ColumnStatisticsEntry[], required
      - `columnName` string, required
      - `dataSize` integer: Total data size of the column in bytes.
      - `max` string: Maximum value in the column (string-encoded).
      - `min` string: Minimum value in the column (string-encoded).
      - `ndv` integer: NDV (Number of Distinct Values) — approximate cardinality of the column.
      - `nullCount` integer: Number of NULL values in the column.
    - `dataSize` integer: Total data size of the table in bytes.
    - `rowCount` integer: Total number of rows in the table.
    - `schemaName` string, required
    - `tableName` string, required

---

[API](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-cn-oapi-all-api/revisions/c728ef303bfb?raw)
