Setting the file. One moment.
Skill 103 · Querying PostHog Data
Subchapter 103.56
references/models-session-recordings.mdMarkdown2 KBView on GitHub
Metadata for session recordings captured by the PostHog SDK. The actual replay data lives in ClickHouse and object storage; this Postgres table stores recording-level metadata used for listing and filtering.
| Column | Type | Nullable | Description |
|---|---|---|---|
id | String | NOT NULL | Recording row UUID. |
session_id | String | NOT NULL | Session identifier; matches events.$session_id. |
team_id | Integer | NOT NULL | |
distinct_id | String | NOT NULL | Distinct id of the user/device recorded. |
duration | Integer | NOT NULL | Total recording length in seconds (active + inactive). |
active_seconds | Integer | NOT NULL | Seconds of active user engagement. |
inactive_seconds | Integer | NOT NULL | Seconds with no user activity. |
start_time | DateTime | NOT NULL | When the recording started. |
end_time | DateTime | NOT NULL | When the recording ended. |
click_count | Integer | NOT NULL | Number of clicks captured. |
keypress_count | Integer | NOT NULL | Number of keypresses captured. |
mouse_activity_count | Integer | NOT NULL | Number of mouse-activity events captured. |
console_log_count | Integer | NOT NULL | Number of console.log messages captured. |
console_warn_count | Integer | NOT NULL | Number of console.warn messages captured. |
console_error_count | Integer | NOT NULL | Number of console.error messages captured. |
start_url | String | NOT NULL | URL where the recording started. |
deleted | Integer | NOT NULL | 1 if the recording has been deleted, 0 otherwise. |
created_at | DateTime | NOT NULL | When the recording metadata row was created. |
retention_period_days | Integer | NOT NULL | How long the recording is retained, in days. |
team_id)distinct_idSessionRecordingPlaylistItemsession_id field is the user-facing ID (used in URLs and API calls), not the internal idifNull(deleted, 0) = 0 — deleted is an integer 0/1, NULL for older rows