Mode disclosure
All modes use one coherent workspace; only disclosure and guidance change. Project mode keeps the persistent brief, milestones, notes, saved intermediate queries, validation checklist, and report export together.
Organization Data Repair and Schema Hardening / capstone step
P04-S01 - Organization Data Repair and Schema Hardening: Profile
Profile. A growing company has inconsistent employee/team data. The learner must profile defects, repair state safely, add integrity rules, and demonstrate an idempotent import/update workflow.
- Result grain
- one row per detected defect class and entity
- Exact columns
- defect_class; entity_id; defect_count; recommended_action
SQL editor shortcuts: Ctrl or Command Enter runs the query, Ctrl or Command Shift Enter checks it, Alt H opens the next hint, Ctrl or Command slash toggles a line comment, Ctrl or Command Shift F formats the SQL, and Escape closes transient UI.
Cursor at line 1, column 1.
Project Evidence Contract
- Grain declaration
- one row per detected defect class and entity
- Key uniqueness
- defect_class plus entity_id identifies each defect row.
- Dependency gate
- First milestone
Validation Checklist
- Separate labels from stable IDs.
- Check audit references against employees.
- Identify active employees whose manager or department would break hardening.
Required Snapshots
- defect profile output
Repair and hardening milestones cannot pass unless target populations are profiled first.
Project notes and intermediate queries
Notes and saved intermediate queries stay local to this project milestone.
Scenario
A growing company has inconsistent employee/team data. The learner must profile defects, repair state safely, add integrity rules, and demonstrate an idempotent import/update workflow.
Organization Data Repair and Schema Hardening / capstone step
One-sentence task
Profile. A growing company has inconsistent employee/team data. The learner must profile defects, repair state safely, add integrity rules, and demonstrate an idempotent import/update workflow.
Project mode disclosure
Persistent brief, milestones, notes, saved intermediate queries, validation checklist, and report export stay together.
Structured output contract
- Result grain
- one row per detected defect class and entity
- Exact columns
- defect_class; entity_id; defect_count; recommended_action
- Source population
- Use the prompt setup plus FROM, JOIN, WHERE, and subquery predicates as the source population. Visible rows are only examples.
- Grouping
- Group only at the requested output grain: one row per detected defect class and entity.
- Ordering
- No display order requirement unless Check reports one.
- Validation
- select-only; hidden deterministic variants.
Relevant tables
Time and difficulty
- Estimated time
- 8 minutes
- Difficulty
- 5/5
Objective and concepts
Produce profile evidence with SQL, validation, assumptions, and bounded snapshots.
Glossary links
Concept material
Profile defects, repair state safely, add integrity rules, and demonstrate idempotent import.
Why this works
Profile defects, repair state safely, add integrity rules, and demonstrate idempotent import.
Edge cases
Duplicate names Conflicting natural keys Orphan children Self/cyclic managers Invalid date ranges Partial import fields Repeated import execution Constraint-boundary values
PostgreSQL note
Project SQL runs locally with PostgreSQL-compatible semantics and project-specific hidden variants.
Assumptions, dialect notes, and common traps
- Duplicate policy
- Preserve duplicate facts unless the prompt explicitly asks for distinct tuples or set semantics.
- Null policy
- Preserve NULL, empty string, zero, and false as distinct values unless the contract says to display a fallback.
- Tie-breakers
- Use every ordering rule in the contract and end tied business metrics with deterministic secondary keys when needed.
- Zero-related entities
- Preserve requested zero-related, no-match, or complete-period entities and make display fallback explicit.
- Numeric tolerance
- Use exact semantic comparison unless the activity explicitly declares a numeric tolerance.
Opened hints
No hints opened yet.