DIM_CUSTOMER
GOLD SCD Type 2 · Customer master dimension ~500,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| customer_id | STRING | PK | NOT NULL | Surrogate key: CUST-XXXXXXXX |
| id_number | STRING(13) | NOT NULL | SA 13-digit identity document number (masked in Silver, visible in Gold with access) | |
| first_name | STRING | NOT NULL | Customer first name | |
| last_name | STRING | NOT NULL | Customer surname | |
| date_of_birth | DATE | NOT NULL | Date of birth (derived from id_number digits 1–6) | |
| gender | STRING | NOT NULL | Male / Female / Non-Binary (derived from id_number digits 7–10) | |
| province | STRING | NOT NULL | One of 9 SA provinces | |
| city | STRING | NULLABLE | City of primary residence | |
| postal_code | STRING(4) | NULLABLE | SA 4-digit postal code | |
| customer_segment | STRING | NOT NULL | Retail / Business / Private Banking / Youth / Student | |
| employment_status | STRING | NULLABLE | Employed / Self-Employed / Unemployed / Retired / Student | |
| annual_income_zar | DECIMAL(15,2) | NULLABLE | Self-declared gross annual income in ZAR | |
| credit_score | INTEGER | NULLABLE | PCB proprietary credit score 300–850 (updated monthly by ML model) | |
| kyc_status | STRING | NOT NULL | Verified / Pending / Expired / Failed (FICA compliance) | |
| onboarding_date | DATE | NOT NULL | Date customer account was activated | |
| is_active | BOOLEAN | NOT NULL | TRUE if customer has at least one active product | |
| scd_start_date | DATE | NOT NULL | SCD2 validity start | |
| scd_end_date | DATE | NULLABLE | SCD2 validity end (NULL = current record) | |
| is_current | BOOLEAN | NOT NULL | TRUE = current active SCD2 record |
DIM_FINTECH
GOLD SCD Type 1 · SA fintech acquiring partners 5 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| fintech_id | STRING | PK | NOT NULL | Surrogate key: FT001–FT005 |
| fintech_name | STRING | NOT NULL | Partner name: Yoco / SnapScan / PayFast / Peach Payments / PayGate | |
| platform_type | STRING | NOT NULL | POS Card Acquiring / QR Code Payments / E-commerce Gateway / API Payment Platform / Enterprise Payment Gateway | |
| fee_rate_pct | DECIMAL(5,4) | NOT NULL | Merchant Discount Rate percentage (e.g. 2.95 = 2.95%) | |
| min_fee_zar | DECIMAL(8,2) | NOT NULL | Minimum fee per transaction in ZAR (0.00 if no minimum) | |
| avg_basket_zar | DECIMAL(10,2) | NULLABLE | Average transaction basket size in ZAR (from partner reporting) | |
| active_merchants_est | INTEGER | NULLABLE | Estimated active merchant count on the platform nationally | |
| annual_volume_zar_bn | DECIMAL(8,2) | NULLABLE | Reported annual transaction volume in billions ZAR | |
| settlement_days | INTEGER | NOT NULL | Business days to settlement (1 = next-day, 2 = T+2) | |
| risk_rating | STRING | NOT NULL | PCB internal risk rating: Low / Medium / High | |
| headquarters | STRING | NULLABLE | Headquarters city | |
| founded_year | INTEGER | NULLABLE | Year company was founded | |
| is_active | BOOLEAN | NOT NULL | TRUE = partnership currently active |
FACT_FINTECH_SETTLEMENT
GOLD Monthly grain · Partner settlement totals 60 rows (5 partners × 12 months)| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| settlement_id | STRING | PK | NOT NULL | Surrogate key: SET-XXXXXXXX |
| fintech_id | STRING | FK | NOT NULL | References DIM_FINTECH.fintech_id |
| settlement_month | DATE | NOT NULL | First day of settlement month (partition key) | |
| gross_volume_zar | DECIMAL(18,2) | NOT NULL | Total merchant transaction volume processed through the partner | |
| transaction_count | BIGINT | NOT NULL | Number of individual transactions in the settlement period | |
| mdr_fees_zar | DECIMAL(15,2) | NOT NULL | Merchant Discount Rate fees earned by PCB (gross_volume × fee_rate) | |
| net_settlement_zar | DECIMAL(18,2) | NOT NULL | Amount settled to merchants after deducting MDR fees | |
| chargeback_count | INTEGER | NOT NULL | Number of chargeback disputes received | |
| chargeback_value_zar | DECIMAL(12,2) | NOT NULL | Total ZAR value of chargeback disputes | |
| dispute_count | INTEGER | NOT NULL | Total disputes (chargebacks + merchant queries) | |
| settlement_status | STRING | NOT NULL | Completed / Pending / Disputed | |
| load_timestamp | TIMESTAMP | NOT NULL | Databricks pipeline ingestion timestamp |
FACT_FRAUD_ALERT
GOLD Transaction-level · ML-generated fraud signals ~48,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| alert_id | STRING | PK | NOT NULL | Surrogate key: ALT-XXXXXXXX |
| transaction_id | STRING | FK | NULLABLE | References FACT_TRANSACTION (null for proactive/non-tx alerts) |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER.customer_id |
| account_id | STRING | FK | NULLABLE | References DIM_ACCOUNT |
| alert_date | DATE | NOT NULL | Date alert was triggered (partition key) | |
| alert_type | STRING | NOT NULL | Real-time / Batch / Manual Review | |
| fraud_category | STRING | NOT NULL | Card Not Present / Account Takeover / Identity Fraud / ATM Skimming / Phishing / Merchant Fraud / Debit Order Abuse | |
| risk_score | DECIMAL(4,3) | NOT NULL | ML model output: 0.000–1.000 (≥0.80 = Critical) | |
| amount_zar | DECIMAL(15,2) | NULLABLE | Transaction amount at risk in ZAR | |
| status | STRING | NOT NULL | Open / Under Investigation / Resolved / False Positive | |
| investigation_status | STRING | NULLABLE | Assigned / In Progress / Escalated / Closed | |
| resolution_date | DATE | NULLABLE | Date alert was resolved (null if still open) | |
| ml_model_version | STRING | NOT NULL | Model version that generated the alert (e.g. fraud_v3.2.1) | |
| ml_confidence_score | DECIMAL(4,3) | NULLABLE | Model confidence in the prediction (separate from risk score) | |
| feature_flags | STRING | NULLABLE | JSON: top contributing features (velocity, geo_mismatch, device_new) |
DIM_ACCOUNT
GOLDSCD Type 1 · Account master~820,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| account_id | STRING | PK | NOT NULL | Surrogate key: ACC-XXXXXXXX |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER |
| branch_id | STRING | FK | NOT NULL | References DIM_BRANCH |
| account_number | STRING(12) | NOT NULL | PCB account number (masked: ****XXXX) | |
| account_type | STRING | NOT NULL | Savings / Cheque / Investment / Fixed Deposit / Money Market | |
| current_balance_zar | DECIMAL(18,2) | NOT NULL | Current balance as of last statement date | |
| available_balance_zar | DECIMAL(18,2) | NOT NULL | Available balance (current minus holds) | |
| interest_rate_pct | DECIMAL(5,4) | NULLABLE | Annual interest rate applied to the account | |
| account_status | STRING | NOT NULL | Active / Dormant / Closed / Suspended / Frozen | |
| open_date | DATE | NOT NULL | Date account was opened | |
| close_date | DATE | NULLABLE | Date account was closed (null if open) |
DIM_BRANCH
GOLDSCD Type 1 · Branch / ATM network200 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| branch_id | STRING | PK | NOT NULL | Surrogate key: BR001–BR200 |
| branch_name | STRING | NOT NULL | Branch display name | |
| branch_type | STRING | NOT NULL | Flagship / Full Service / Standard / Micro Branch / ATM Only | |
| province | STRING | NOT NULL | One of 9 SA provinces | |
| city | STRING | NOT NULL | Municipality city | |
| region | STRING | NULLABLE | PCB internal sales region (matches SARB reporting regions) | |
| latitude | DECIMAL(9,6) | NULLABLE | GPS latitude for mapping | |
| longitude | DECIMAL(9,6) | NULLABLE | GPS longitude for mapping | |
| opening_date | DATE | NOT NULL | Branch opening date | |
| is_active | BOOLEAN | NOT NULL | TRUE = currently operational |
DIM_MERCHANT
GOLDSCD Type 1 · Card acquiring merchant registry~45,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| merchant_id | STRING | PK | NOT NULL | Surrogate key: MERCH-XXXXXXXX |
| merchant_name | STRING | NOT NULL | Registered merchant trading name | |
| merchant_category_code | STRING(4) | NOT NULL | ISO 18245 MCC (e.g. 5411 = Grocery, 5541 = Service Stations) | |
| merchant_category | STRING | NOT NULL | Human-readable MCC group | |
| province | STRING | NOT NULL | Province of primary business address | |
| city | STRING | NULLABLE | City | |
| acquiring_bank | STRING | NOT NULL | Acquiring institution (Prime Capital Bank) | |
| risk_level | STRING | NOT NULL | Low / Medium / High / Blocked | |
| is_active | BOOLEAN | NOT NULL | Active merchant relationship |
DIM_DATE
GOLDStatic · Calendar dimension 2020–20251,826 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| date_id | INTEGER | PK | NOT NULL | YYYYMMDD integer key (e.g. 20240315) |
| calendar_date | DATE | NOT NULL | Full date | |
| year | INTEGER | NOT NULL | Calendar year | |
| quarter | INTEGER | NOT NULL | 1–4 | |
| month | INTEGER | NOT NULL | 1–12 | |
| month_name | STRING | NOT NULL | January … December | |
| day_of_week | INTEGER | NOT NULL | 1=Monday … 7=Sunday (ISO 8601) | |
| day_name | STRING | NOT NULL | Monday … Sunday | |
| is_weekend | BOOLEAN | NOT NULL | Saturday or Sunday | |
| is_public_holiday | BOOLEAN | NOT NULL | SA public holiday flag | |
| is_business_day | BOOLEAN | NOT NULL | Not weekend and not public holiday |
DIM_COUNTERPARTY
GOLDSCD Type 1 · Payment counterparties (other banks, individuals)~12,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| counterparty_id | STRING | PK | NOT NULL | Surrogate key: CP-XXXXXXXX |
| counterparty_name | STRING | NOT NULL | Institution or individual name | |
| counterparty_type | STRING | NOT NULL | Retail Bank / Corporate / Individual / Government / NBFI | |
| bank_code | STRING(6) | NULLABLE | SARB universal branch code | |
| country | STRING | NOT NULL | Country of institution (ZA for domestic) | |
| aml_risk_rating | STRING | NOT NULL | PCB AML risk: Low / Medium / High / Blocked |
DIM_CURRENCY
GOLDStatic · ISO 4217 currencies8 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| currency_id | STRING | PK | NOT NULL | CUR001–CUR008 |
| currency_code | STRING(3) | NOT NULL | ISO 4217 code (ZAR, USD, EUR, GBP, CNY, BWP, ZMW, MZN) | |
| currency_name | STRING | NOT NULL | Full currency name | |
| symbol | STRING | NOT NULL | Currency symbol (R, $, €, £, ¥, P, ZK, MT) | |
| is_base_currency | BOOLEAN | NOT NULL | TRUE = ZAR (base reporting currency) | |
| country | STRING | NOT NULL | Issuing country |
FACT_TRANSACTION
GOLDTransaction-level · Core banking ledger12M+ rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| transaction_id | STRING | PK | NOT NULL | Surrogate key: TXN-XXXXXXXX |
| account_id | STRING | FK | NOT NULL | References DIM_ACCOUNT |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER (denormalised for query performance) |
| transaction_date | DATE | NOT NULL | Transaction date (partition key) | |
| transaction_datetime | TIMESTAMP | NOT NULL | Full timestamp with time zone | |
| transaction_type | STRING | NOT NULL | Credit / Debit / Transfer / Fee / Interest / Reversal | |
| channel | STRING | NOT NULL | Branch / ATM / Online / Mobile / USSD / POS | |
| amount_zar | DECIMAL(15,2) | NOT NULL | Transaction amount in ZAR (always positive; sign determined by debit_credit_flag) | |
| debit_credit_flag | STRING(1) | NOT NULL | D = Debit, C = Credit | |
| merchant_id | STRING | FK | NULLABLE | References DIM_MERCHANT (null for non-merchant transactions) |
| merchant_name | STRING | NULLABLE | Merchant name (denormalised from POS terminal data) | |
| merchant_category | STRING | NULLABLE | MCC category description | |
| balance_after_zar | DECIMAL(18,2) | NOT NULL | Account balance immediately after transaction | |
| reference | STRING | NULLABLE | Customer reference or payment narrative | |
| is_flagged | BOOLEAN | NOT NULL | TRUE if transaction generated a fraud alert |
FACT_LOAN
GOLDLoan-level · Credit portfolio snapshot~280,000 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| loan_id | STRING | PK | NOT NULL | Surrogate key: LN-XXXXXXXX |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER |
| account_id | STRING | FK | NOT NULL | References DIM_ACCOUNT (linked lending account) |
| loan_type | STRING | NOT NULL | Home Loan / Personal Loan / Vehicle Finance / Revolving Credit / Business Loan | |
| approved_amount_zar | DECIMAL(15,2) | NOT NULL | Original approved loan amount | |
| outstanding_balance_zar | DECIMAL(15,2) | NOT NULL | Current outstanding balance | |
| interest_rate_pct | DECIMAL(5,4) | NOT NULL | Annual interest rate (Prime ± spread) | |
| loan_term_months | INTEGER | NOT NULL | Loan term in months | |
| months_in_arrears | INTEGER | NOT NULL | Number of months payment is overdue (0 = current) | |
| loan_status | STRING | NOT NULL | Current / Non-Performing / Default / Restructured / Closed / Written Off | |
| provision_zar | DECIMAL(15,2) | NOT NULL | IFRS 9 expected credit loss provision | |
| risk_weight_pct | DECIMAL(5,2) | NOT NULL | Basel III risk weight applied (35% home loan, 75% retail, 100% corporate) | |
| origination_date | DATE | NOT NULL | Date loan was disbursed | |
| maturity_date | DATE | NOT NULL | Scheduled loan end date | |
| pd_score | DECIMAL(5,4) | NULLABLE | Probability of Default from credit scoring ML model (0–1) | |
| lgd_pct | DECIMAL(5,4) | NULLABLE | Loss Given Default estimate |
FACT_CARD_TRANSACTION
GOLDCard-level · POS and online card transactions~3.2M rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| card_tx_id | STRING | PK | NOT NULL | Surrogate key: CTX-XXXXXXXX |
| merchant_id | STRING | FK | NOT NULL | References DIM_MERCHANT |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER |
| tx_date | DATE | FK | NOT NULL | References DIM_DATE (partition key) |
| card_type | STRING | NOT NULL | Visa Debit / Visa Credit / Mastercard Debit / Mastercard Credit | |
| entry_mode | STRING | NOT NULL | Chip / Tap / Swipe / Online / Manual Key Entry | |
| amount_zar | DECIMAL(12,2) | NOT NULL | Transaction amount in ZAR | |
| authorization_code | STRING(6) | NULLABLE | Issuer authorization code | |
| response_code | STRING(2) | NOT NULL | 00=Approved, 05=Declined, 51=Insufficient Funds, 57=Not Permitted | |
| is_international | BOOLEAN | NOT NULL | TRUE if merchant country ≠ ZA | |
| is_contactless | BOOLEAN | NOT NULL | TRUE if NFC/tap payment | |
| fraud_flag | BOOLEAN | NOT NULL | TRUE if transaction linked to confirmed fraud |
FACT_PAYMENT
GOLDPayment-level · EFT, SWIFT, PayShap transfers~1.8M rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| payment_id | STRING | PK | NOT NULL | Surrogate key: PAY-XXXXXXXX |
| account_id | STRING | FK | NOT NULL | References DIM_ACCOUNT (originating account) |
| counterparty_id | STRING | FK | NOT NULL | References DIM_COUNTERPARTY |
| currency_id | STRING | FK | NOT NULL | References DIM_CURRENCY |
| payment_type | STRING | NOT NULL | EFT / SWIFT / PayShap / RTC / Debit Order / SARB RTGS | |
| amount_original | DECIMAL(18,2) | NOT NULL | Amount in originating currency | |
| amount_zar | DECIMAL(18,2) | NOT NULL | ZAR equivalent (using exchange rate at payment datetime) | |
| zar_rate | DECIMAL(12,6) | NOT NULL | Exchange rate applied (ZAR per foreign currency unit) | |
| payment_status | STRING | NOT NULL | Processed / Pending / Returned / Recalled / Rejected | |
| value_date | DATE | NOT NULL | Date funds become available to beneficiary | |
| aml_screened | BOOLEAN | NOT NULL | TRUE = payment passed AML screening | |
| aml_risk_score | DECIMAL(4,3) | NULLABLE | AML model risk score 0–1 |
FACT_AML_CASE
GOLDCase-level · FIC Act suspicious activity reports~8,200 rows| Column | Type | Key | Nullable | Description |
|---|---|---|---|---|
| case_id | STRING | PK | NOT NULL | Surrogate key: AML-XXXXXXXX |
| customer_id | STRING | FK | NOT NULL | References DIM_CUSTOMER |
| case_type | STRING | NOT NULL | STR / CTR / SAR / Enhanced Due Diligence / PEP Screening | |
| trigger_rule | STRING | NOT NULL | Rule or ML model that triggered the case | |
| risk_score | DECIMAL(4,3) | NOT NULL | AML model risk score 0–1 | |
| total_exposure_zar | DECIMAL(18,2) | NULLABLE | Cumulative suspicious transaction value | |
| fic_report_filed | BOOLEAN | NOT NULL | TRUE = SAR/STR filed with Financial Intelligence Centre | |
| case_status | STRING | NOT NULL | Open / Investigating / Escalated / Closed — Suspicious / Closed — Cleared | |
| opened_date | DATE | NOT NULL | Date case was opened (partition key) | |
| closed_date | DATE | NULLABLE | Date case was resolved |