Warehouse Column

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
GET

List all warehouse column statistics

Read per-column data statistics (null fraction, min/max, row count) for warehouse tables.

Statistics are computed automatically after a sync and surfaced to the AI agent so it can write better queries. They are system-owned and read-only here. List can be filtered to one table with ?table_id=<uuid>.

Required API key scopes

warehouse_table:read

Query parameters

  • limit
    integer
  • offset
    integer
  • table_id
    string

Response


Example request

GET /api/projects/:project_id/warehouse_column_statistics
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/warehouse_column_statistics/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"column_name": "string",
"column_type": "string",
"row_count": 0,
"null_count": 0,
"null_fraction": 0.1,
"min_value": "string",
"max_value": "string",
"has_min_max": true,
"computed_at": "2019-08-24T14:15:22Z",
"computed_for_delta_version": 0,
"stats_basis": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Retrieve warehouse column statistics

Read per-column data statistics (null fraction, min/max, row count) for warehouse tables.

Statistics are computed automatically after a sync and surfaced to the AI agent so it can write better queries. They are system-owned and read-only here. List can be filtered to one table with ?table_id=<uuid>.

Required API key scopes

warehouse_table:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/warehouse_column_statistics/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/warehouse_column_statistics/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"table": "07ef5ba8-1af0-4779-8f89-822f61a5c62a",
"column_name": "string",
"column_type": "string",
"row_count": 0,
"null_count": 0,
"null_fraction": 0.1,
"min_value": "string",
"max_value": "string",
"has_min_max": true,
"computed_at": "2019-08-24T14:15:22Z",
"computed_for_delta_version": 0,
"stats_basis": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Community questions

Questions about this page? or post a community question.