Skip to content
Back to challenges
Grain and Fact TypesConcept Challengeadvanced25 min

Out-of-order milestones

Model a loan underwriting workflow so late milestone updates preserve event time and load audit context.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

fact-table-grain

The primary modeling idea this problem reinforces.

Requirements

6

Business needs the model must satisfy.

Read the concept guide: Fact table grain
Scenario

A lending team receives underwriting updates out of order: approval can arrive before document validation, and funding events sometimes backfill days later. Analysts still need days from submitted to approved to funded by borrower risk tier and loan product.

Why this matters

Accumulating snapshots update as milestones arrive. Without event-time milestones and load audit context, late or out-of-order updates quietly rewrite the workflow with no way to explain what changed.

Requirements
  • Create a loan underwriting fact where one row represents one loan application workflow.
  • Keep the loan application id queryable on the fact.
  • Add submitted, approved, and funded event-time milestone columns.
  • Add a loaded-at audit timestamp for update traceability.
  • Add a days-to-fund or elapsed-days measure.
  • Connect borrower and loan-product context through explicit N:1 relationships.
Read-only starter workspace
Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

Template

Loan underwriting starter workspace

The model users start from in the full workspace.

Entities

2

Seeded tables visible in the public preview.

Dialect

postgresql

Generated SQL target for this starter model.

Mini Map

This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

Open workspace

Try the question first.

The discussion has other people's approaches and solutions. Give it a real attempt before you read them.