Prefect Cloud

Prefect Cloud

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Connect Prefect Cloud to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Enter your Prefect Cloud account ID, workspace ID, and an API key to pull your flow and task run history into the PostHog Data warehouse.

Both IDs are in your workspace URL: https://app.prefect.cloud/account/<account ID>/workspace/<workspace ID>.

Create an API key under API keys in your profile settings, or use a service account key on paid tiers. The key inherits the owner's permissions, so read access to the workspace is all it needs.

Configuration

OptionTypeRequired
Account IDtextYes
Workspace IDtextYes
API keypasswordYes

Linking Prefect Cloud to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select Prefect Cloud
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
flows

A flow is a Prefect workflow definition — the top-level container that flow runs are instances of.

Full refresh
flow_runs

Incremental syncs re-read a 24-hour trailing window so recently started runs pick up state changes; runs that change state later than that are only refreshed by a full refresh

Incremental, Full refreshstart_time, expected_start_time
task_runs

Incremental syncs re-read a 24-hour trailing window so recently started runs pick up state changes; runs that change state later than that are only refreshed by a full refresh

Incremental, Full refreshexpected_start_time
deployments

A deployment is a server-side representation of a flow that can be scheduled and triggered remotely, with its schedule, work pool, and parameters.

Full refresh
work_pools

A work pool organizes and distributes flow runs to workers of a given infrastructure type.

Full refresh
work_queues

A work queue within a work pool that prioritizes and delivers flow runs to workers.

Full refresh