Out-of-order milestones
Model a loan underwriting workflow so late milestone updates preserve event time and load audit context.
Concept
fact-table-grain
The primary modeling idea this problem reinforces.
Requirements
6
Business needs the model must satisfy.
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.
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.
- 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.
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.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.