Design a star schema for a reporting use case
A dimensional model with fact tables, dimensions, grain, keys, and slowly changing dimension choices for a BI or reporting need.
The prompt
Help me design a dimensional model (star schema) for a reporting use case.
Business process to report on: [e.g. "sales orders", "support tickets", "subscriptions"]
Questions the reports must answer: [LIST 5-10 real questions]
Source tables: [PASTE names, key columns, and how they relate]
BI tool: [e.g. Power BI, Tableau, Looker, Metabase]
Data volume and refresh needs: [rows per day, how fresh it must be]
Steps:
1. Declare the grain of each fact table in one sentence and explain why. Flag if more than one fact table is needed (e.g. transactions vs. periodic snapshots).
2. List the measures and say whether each is additive, semi-additive (like balances), or non-additive (like ratios).
3. Define the dimensions, their attributes, and hierarchies (e.g. day > month > quarter).
4. Choose keys: surrogate vs. natural keys, and how to handle unknown or late-arriving members.
5. Recommend a slowly changing dimension approach for attributes that change over time (type 1 overwrite vs. type 2 history) and why.
6. Point out traps: many-to-many relationships, role-playing dimensions (order date vs. ship date), degenerate dimensions, and fan-out risks.
Return:
- A text diagram of the schema.
- A table per fact and dimension: Column | Type | Description | Source.
- A check that each listed business question can be answered, and how.
- Notes on implementing it well in my BI tool.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Data & Analysis prompts
What to fill in
- e.g. "sales orders", "support tickets", "subscriptions"
- LIST 5-10 real questions
- PASTE names, key columns, and how they relate
- e.g. Power BI, Tableau, Looker, Metabase
- rows per day, how fresh it must be
How this prompt is built
This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.
Related prompts
- Break down my results into the business drivers behind themBuilds a driver tree from your results, sizes how much each driver contributed to the change, and names which ones to act on.
- Explain a dataset or report in plain business languageExplains what a dataset or report contains, what each column or metric means, and what it shows, in words anyone can follow.
- Break down why a number changed between two periodsA driver breakdown and bridge that shows exactly which segments, volume, price, or mix effects caused a metric to move.
- Explain a complicated Excel formula in plain EnglishBreaks down a long or nested Excel formula step by step, says what it actually returns, and points out hidden risks.