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:
eventsandpersonsread the raw layer and run first, in parallelperson_distinct_idsandaccountsboth depend onpersonsonly, so they run next, also in parallelsessionsandfeature_flag_exposuresreadeventsandperson_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.