← ClaudeAtlas

how-to-schema-and-warehouselisted

Turn a raw operational data dump into a queryable star-schema warehouse with a data contract, using DuckDB + pandera. Use when handed raw exports from one or more source systems and asked to "design a schema", "build a warehouse", "model this data", "set up a data lake / warehouse", "create a star schema", "reconcile these sources", or before any analytics/BI is built on unmodeled data. Walks the 6-step pipeline - input, sample data, objective, find-skills, build (ERD + DDL + contract + real queries), expert review - and outputs a genuinely queryable warehouse, not just a diagram.
phoebefu6/phoebe-data-skills · ★ 1 · AI & Automation · score 72
Install: claude install-skill phoebefu6/phoebe-data-skills
# how-to-schema-and-warehouse Infrastructure-layer skill (the base of the phoebe-data-skills 4-layer roadmap). Trust-first: the output is a warehouse someone can actually query plus a contract that keeps it trustworthy - never a pretty ERD of already-clean data. Showcase walkthrough (Everrest retail case, real DuckDB build): https://github.com/phoebefu6/phoebe-data-skills - `docs/how-to-schema-and-warehouse/` ## The lineage this skill produces `raw dump (messy sources) -> lake (partitioned) -> warehouse (star schema) -> marts`. Defects live in the raw layer; the warehouse transform is where they get resolved. ## The 6 steps ### 1. Input Collect the raw sources as-is: every export, its key format, its grain, its defects. Note where keys should join across systems. Do not assume anything is clean - a real platform is handed exports, not tables. ### 2. Sample data (only when real data isn't available yet) Write a seeded generator producing the raw dump from multiple "source systems" with ingestion-flavored defects planted on purpose: orphan foreign keys, heterogeneous keys across systems, dirty categorical labels, timezone/timestamp bugs, fabricated amounts, duplicate identities. Document each in the docstring. With real data, skip - the defects are already there. ### 3. Objective Frame the trust question: "can we turn this dump into a warehouse the company can query and trust, and what breaks if we skip modeling?" 3-5 sub-questions covering keys resolving, sources reconc