Bruin CLI Step 4 of 7

PostHog Product Analytics Pipeline with BigQuery

1) Run the staging layer

bruin run --selector "path:assets/posthog_stage" .

No --full-refresh on this run or any other. All six models are materialization: type: table, so each one rebuilds itself from scratch every time - the flag has nothing to truncate that the rebuild would not replace anyway.

Bruin resolves the dependency order from each asset's depends block, so you do not order them yourself:

  • events and persons read the raw layer and run first, in parallel
  • person_distinct_ids and accounts both depend on persons only, so they run next, also in parallel
  • sessions and feature_flag_exposures read events and person_distinct_ids, so they run last

accounts is the one that reads slightly differently than you would expect: it rolls up persons directly and never touches the identity map, because a company attribute lives on the person profile rather than on an event.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Accept cookies to load it.