data-model-designer-data
Agent: Data Analyst
L2 data analyst (Nx) responsible for data modelling, instrumentation implementation, metrics dashboards, funnel analysis, and signal synthesis.
Department ethos: ideal-data-growth.md
Skill Description
The data model designer structures the analytics data warehouse by defining event fact tables, dimension tables, and materialized views that enable analysts to query user behaviour, compute metrics, and build cohorts without writing complex multi-join SQL for every question.
When to Use
- When a new product domain or feature area requires a data model before instrumentation implementation.
- When analysts report that common queries require excessive joins, subqueries, or manual transformations.
- When the team migrates to a new data warehouse or analytics platform and needs to redesign the schema.
- When event volume growth degrades query performance and the model needs denormalization or pre-aggregation.
Workflow
- Gather query requirements: Interview analysts, PMs, and growth leads to collect the top 20 questions the data model must support. Classify by frequency (daily, weekly, ad-hoc).
- Define fact tables: Design event fact tables with grain (one row per event), foreign keys to dimensions, and measures. Apply star schema conventions for query simplicity.
- Define dimension tables: Create dimension tables for users, sessions, products, channels, and time. Include slowly changing dimension (SCD) handling for attributes that evolve (plan tier, segment).
- Design materialized views: For high-frequency queries (daily active users, funnel step counts, cohort retention), create materialized views or summary tables with defined refresh cadence.
- Validate with sample queries: Write the top 10 queries against the proposed model. Verify each completes within acceptable latency and produces correct results against raw data.
- Document the model: Produce an entity-relationship diagram, a data dictionary with column descriptions and types, and a query cookbook with examples for common analyses.
- Plan migration: If modifying an existing model, define the migration path, backfill strategy, and cutover plan. Ensure downstream dashboards are updated.
Anti-Patterns
- Snowflake over-normalization: Normalizing every attribute into its own dimension table creates excessive joins that slow queries and confuse analysts. Why: analytics workloads favour wide, denormalized tables optimized for read speed over transactional normalization.
- No SCD handling: Treating user dimensions as static ignores that users change plans, segments, and attributes over time. Why: without SCD, historical analyses attribute past behaviour to current attributes, producing misleading cohort metrics.
- Schema-on-read only: Deferring all structure to query time makes every analysis a bespoke engineering effort. Why: pre-modelled data enables self-serve analytics; schema-on-read requires SQL expertise for every question.
- Missing grain documentation: Not specifying the grain of each fact table leads to analysts accidentally double-counting events. Why: if the grain is ambiguous, a "count of purchases" query may return one row per item or one row per order depending on interpretation.
Output
Success:
- An analytics data model containing fact table definitions, dimension table definitions with SCD strategy, materialized view specifications, an ER diagram, a data dictionary, and a query cookbook.
Failure:
- The model cannot support a required query within acceptable latency. Report the query, the bottleneck, and the schema modification or pre-aggregation needed to resolve it.
Related Skills
1---2name: data-model-designer-data3description: This skill designs the analytics data model including event schemas and dimension tables. Use when asked to design an event schema, create dimension tables, or structure a data warehouse for analytics queries. Also consider when a new product domain lacks a data model. Suggest when analysts report slow or impossible queries due to schema gaps.4---56# data-model-designer-data78## Agent: Data Analyst910L2 data analyst (Nx) responsible for data modelling, instrumentation implementation, metrics dashboards, funnel analysis, and signal synthesis.1112Department ethos: [ideal-data-growth.md](../../../../departments/data-growth/ideal-data-growth.md)1314## Skill Description1516The data model designer structures the analytics data warehouse by defining event fact tables, dimension tables, and materialized views that enable analysts to query user behaviour, compute metrics, and build cohorts without writing complex multi-join SQL for every question.1718## When to Use1920- When a new product domain or feature area requires a data model before instrumentation implementation.21- When analysts report that common queries require excessive joins, subqueries, or manual transformations.22- When the team migrates to a new data warehouse or analytics platform and needs to redesign the schema.23- When event volume growth degrades query performance and the model needs denormalization or pre-aggregation.2425## Workflow26271. **Gather query requirements**: Interview analysts, PMs, and growth leads to collect the top 20 questions the data model must support. Classify by frequency (daily, weekly, ad-hoc).282. **Define fact tables**: Design event fact tables with grain (one row per event), foreign keys to dimensions, and measures. Apply star schema conventions for query simplicity.293. **Define dimension tables**: Create dimension tables for users, sessions, products, channels, and time. Include slowly changing dimension (SCD) handling for attributes that evolve (plan tier, segment).304. **Design materialized views**: For high-frequency queries (daily active users, funnel step counts, cohort retention), create materialized views or summary tables with defined refresh cadence.315. **Validate with sample queries**: Write the top 10 queries against the proposed model. Verify each completes within acceptable latency and produces correct results against raw data.326. **Document the model**: Produce an entity-relationship diagram, a data dictionary with column descriptions and types, and a query cookbook with examples for common analyses.337. **Plan migration**: If modifying an existing model, define the migration path, backfill strategy, and cutover plan. Ensure downstream dashboards are updated.3435## Anti-Patterns3637- **Snowflake over-normalization**: Normalizing every attribute into its own dimension table creates excessive joins that slow queries and confuse analysts. *Why*: analytics workloads favour wide, denormalized tables optimized for read speed over transactional normalization.38- **No SCD handling**: Treating user dimensions as static ignores that users change plans, segments, and attributes over time. *Why*: without SCD, historical analyses attribute past behaviour to current attributes, producing misleading cohort metrics.39- **Schema-on-read only**: Deferring all structure to query time makes every analysis a bespoke engineering effort. *Why*: pre-modelled data enables self-serve analytics; schema-on-read requires SQL expertise for every question.40- **Missing grain documentation**: Not specifying the grain of each fact table leads to analysts accidentally double-counting events. *Why*: if the grain is ambiguous, a "count of purchases" query may return one row per item or one row per order depending on interpretation.4142## Output4344**Success:**45- An analytics data model containing fact table definitions, dimension table definitions with SCD strategy, materialized view specifications, an ER diagram, a data dictionary, and a query cookbook.4647**Failure:**48- The model cannot support a required query within acceptable latency. Report the query, the bottleneck, and the schema modification or pre-aggregation needed to resolve it.4950## Related Skills5152- [`instrumentation-spec-data`](../../../data-growth/analytics-lead/instrumentation-spec-data/SKILL.md) -- the event schema in the spec must align with the fact table definitions in the data model.53- [`instrumentation-implementer-data`](../instrumentation-implementer-data/SKILL.md) -- implementation produces the raw events that the data model structures.54- [`metrics-dashboard-builder`](../metrics-dashboard-builder/SKILL.md) -- dashboards query the data model; model changes affect dashboard queries.