how-to-schema-and-warehouselisted
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