Omnibus
200 skills · 1230 min
Omnibus
Skill 97 of 200
Build reusable dimension / lookup tables for a star schema — country/region, timezone, currency, date, plan/product, and other descriptive attributes — on either PostHog…
2 minutes · 412 words · 7 sections
Install
npx skills add PostHog/skills --skill modeling-dimension-tablesnpx skills add PostHog/skills/plugin marketplace add PostHog/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Dimensions are the descriptive tables (dim_country, dim_plan, dim_date) that fact tables join to for
slicing. This skill builds them once, cleanly, so every other model reuses them instead of re-deriving
lookups. Read modeling-warehouse-foundations first (joins + convertCurrency() live there). Catalog of
common dimensions: references/dimension-catalog.md (opens in a new tab); recipes in
references/posthog/ (opens in a new tab) and references/dbt/ (opens in a new tab).
Facts (events, charges, revenue items) are long, keyed, and additive. Dimensions are short, one row per entity, descriptive. You model a dimension in three moves:
SELECT with clean column names, one row per entity (dedupe hard).
Save as a view; materialize it on a slow sync_frequency (7day/30day) since dimensions change
rarely and are read constantly.joins-and-dimensions.md.PostHog ships exchange rates behind convertCurrency(from, to, amount, timestamp?) (Open Exchange Rates,
historical-rate-correct). Use it directly for any money conversion. Only build a currency dimension yourself
in dbt (which has no equivalent), or if you need a rate provider PostHog doesn’t offer.
unique + not_null).country_code, region, plan_tier. These names become the join
surface everything else depends on.governance.md) so other models discover it and don’t build a rival copy.convertCurrency) over a hand-rolled FX table on PostHog.PostHog: shape an aliased dimension view, then materialize + join. Recipes:
references/posthog/dim_country.sql (opens in a new tab) (derive + enrich from events),
dim_plan.sql (opens in a new tab) (lookup/upload pattern).
dbt: conformed dim_* models with unique/not_null/relationships tests, plus a generated
dim_date. Recipes: references/dbt/ (opens in a new tab).
| File | Read when |
|---|---|
references/dimension-catalog.md (opens in a new tab) | Common dimensions, how to source each, and the natural key. |
references/posthog/ (opens in a new tab) | HogQL aliased-dimension view recipes. |
references/dbt/ (opens in a new tab) | dbt dim_date / dim_country + schema.yml tests. |
modeling-warehouse-foundations (joins + currency), setting-up-a-data-warehouse-source /
suggesting-data-imports (sync/upload the source data), and the models that consume these dimensions:
modeling-revenue-metrics, modeling-conversion-metrics, modeling-activation-metrics,
modeling-product-usage-metrics.
Build reusable dimension / lookup tables for a star schema — country/region, timezone, currency, date, plan/product, and other descriptive attributes — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model dimension tables, lookup tables, a star schema, conformed dimensions, or wants to enrich events/revenue/usage with country, region, timezone, plan, or currency attributes without repeating JOINs. Covers sourcing the dimension data (upload, warehouse source, or derive from events), shaping it into an aliased one-row-per-entity view (optionally materialized on a slow schedule since dimensions change rarely), and attaching it to facts via a saved or person join so its columns read as native fields. Key rule: for currency use the built-in convertCurrency() instead of a hand-rolled rate table. Read modeling-warehouse-foundations first; dimensions here are reused by the revenue, conversion, activation, and product-usage modeling skills.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/omnibus/*/SKILL.md, skills/posthog/all/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by PostHog, declaring 6 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./PostHog/skills.md, and each skill at its own .md URL.6 files · 7 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 97.
Documentation the agent loads on demand, rather than up front.