Context
PR #1868 added tfact_certificate which includes inline certificate type classification logic. Reviewer suggested this should be extracted into a dim_certificate_type dimension.
What
- Create
dim_certificate_type with surrogate key, type code, display label, and hierarchy (e.g., honor/verified/audit groupings)
- Move certificate type classification logic out of
tfact_certificate and into the dimension
- Add
certificate_type_fk to tfact_certificate
Current State
Certificate type logic currently lives in tfact_certificate.sql (see type classification CTE). The fact table contains certificate_type as a raw string.
Acceptance Criteria
Context
PR #1868 added
tfact_certificatewhich includes inline certificate type classification logic. Reviewer suggested this should be extracted into adim_certificate_typedimension.What
dim_certificate_typewith surrogate key, type code, display label, and hierarchy (e.g., honor/verified/audit groupings)tfact_certificateand into the dimensioncertificate_type_fktotfact_certificateCurrent State
Certificate type logic currently lives in
tfact_certificate.sql(see type classification CTE). The fact table containscertificate_typeas a raw string.Acceptance Criteria
dim_certificate_typemodel created with stable surrogate key_dim_certificate_type.ymlwith PK uniqueness and accepted_values testscertificate_type_fkadded totfact_certificatecertificate_typestring column kept for backward compatibility or migration notes added