Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

modeling-dimension-tables

Skill by PostHog

Builds reusable dimension tables for a star schema, such as country, region, timezone, currency, date and plan. It works on PostHog data-warehouse views in HogQL or in an external dbt project, for analysts who want to avoid repeating JOINs.

  • Score 86
  • 41k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install modeling-dimension-tables

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/data_modeling/skills/modeling-dimension-tables ~/.claude/skills/modeling-dimension-tables

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install modeling-dimension-tables in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill builds reusable dimension tables for a star schema. Examples include country and region, timezone, currency, date, plan or product, and other descriptive attributes. It works on PostHog data-warehouse views written in HogQL, or in an external dbt project. Dimension data can come from an upload, a warehouse source, or be derived from events.

Each dimension is shaped into an aliased view with one row per entity, and can be materialized on a slow schedule because dimensions change rarely. It is then attached to fact tables through a saved or person join, so its columns read as native fields. For currency, the skill directs users to the built-in convertCurrency() function instead of a hand-rolled rate table. It is aimed at analysts modeling data in PostHog or dbt, and it should be read before the revenue, conversion, activation and product-usage modeling skills.

Written from the project's SKILL.md and checked against it.

What it can do

  • Source dimension dataLoads lookup data from an upload, a warehouse source, or derives it from events.
  • Shape one row per entityBuilds an aliased view with a unique key and clean column names.
  • Materialize on a slow scheduleStores static dimensions on a slow sync frequency such as 7 or 30 days.
  • Attach via saved or person joinJoins a dimension to fact tables so its columns appear as native fields.
  • Currency conversionUses the built-in convertCurrency() function instead of a custom rate table.
  • dbt dimension modelsCreates conformed dim models with unique, not_null and relationships tests, plus dim_date.

What you need

  • PostHog data warehouse access, for HogQL views
  • An external dbt project, for the dbt path

Try asking

  • Build a dim_country dimension from my events
  • Model a plan lookup table and join it to my revenue data
  • Create a dim_date table in my dbt project

Good to know

  • Read modeling-warehouse-foundations first; this skill depends on it.
  • Dimension keys must be unique, or every fact table joined to them will fan out.
  • Building your own currency dimension is only suggested in dbt; on PostHog use convertCurrency().

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: products/data_modeling/skills/modeling-dimension-tables/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB
  • references/dbt/dim_country.sql567 B
  • references/dbt/dim_date.sql917 B
  • references/dbt/schema.yml686 B
  • references/dimension-catalog.md3 KB
Show all 7 files
  • references/posthog/dim_country.sql1 KB
  • references/posthog/dim_plan.sql775 B

Alternatives to modeling-dimension-tables

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

modeling-dimension-tables: common questions

What is a dimension table in a star schema?

The skill describes dimensions as the short, descriptive tables, such as dim_country or dim_plan, that fact tables join to for slicing. Each has one row per entity.

Should I build a currency rate table?

On PostHog, no. The skill says to use the built-in convertCurrency(from, to, amount, timestamp) function, which uses historical rates. Only build your own currency dimension in dbt.

Does it work with dbt?

Yes. The skill includes dbt recipes for dim_date and dim_country with schema.yml tests for uniqueness, not_null and relationships.

How do I install modeling-dimension-tables?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is modeling-dimension-tables free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is modeling-dimension-tables safe to use?

It scores 86 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to modeling-dimension-tables?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

modeling-dimension-tables Install

Add to stack

Loading.