posthog
How to get these credentialsConnection to one PostHog project: a personal API key (phx_...), the numeric project id, and the host (US Cloud by default; EU Cloud or a self-hosted URL via HOST).
CREATE SECRET posthog (
TYPE posthog,
personal_api_key '<PERSONAL_API_KEY>', -- required, secret
project_id '<project_id>',
host '<host>',
timeout '<timeout>',
page_size '<page_size>',
max_wait '<max_wait>'
);
| Key | Type | Required | Description |
|---|---|---|---|
| personal_api_key secret | VARCHAR | Yes | Personal API key (starts with phx_) with read access to Query and the project's resources. Not the project API key (phc_) used for capture. |
| project_id | VARCHAR | No | Numeric project (environment) id from Project settings, e.g. '12345'. Needed by every table except metadata.projects. |
| host | VARCHAR | No | PostHog app URL: 'https://us.posthog.com' (default), 'https://eu.posthog.com', or a self-hosted instance such as 'https://posthog.example.com'. |
| timeout | DOUBLE | No | Per-request timeout in seconds (default 60). |
| page_size | BIGINT | No | Rows per HogQL page for the typed tables, 1 to 50000 (default 10000). |
| max_wait | DOUBLE | No | Seconds to keep polling an asynchronous query before giving up (default 300). |
Needed by hogqlevents_where