KE Data Documentation

website·Indexed 30 days ago

https://docs24.vercel.app/

Technical documentation for Kenyan data tables and schemas, including ke_customer_master, ke_accounts_master, ke_accounts_transactions, and ke_customer_360, as well as STGKE staging tables such as STG_ARR_activity_history and STG_AVERAGE_BALANCE.

Tokens
2.4K
Snippets
7
Records
16
Agent score
75%

What's inside KE Data Documentation

  1. Extend Docusaurus layouts using React

    Docusaurus is powered by React, allowing developers to extend or customize the website layout. You can create custom components or modify the site's behavior while maintaining the existing header and footer.
  2. Get started with Docusaurus documentation

    Docusaurus is designed for quick installation and setup. To begin managing your documentation, place your content files into the docs directory, allowing the framework to handle the underlying site structure and 'chores'.
  3. Reference the ke_accounts_transactions table schema

    The ke_accounts_transactions table contains transaction data and account details. The table includes the following fields:

    Account & Customer Identifiers:

    • account_number, customer_number, customer_id, arrangement_id, customer

    Account Details:

    • account_title_1, account_title_2, short_title, category, category_desc, ac_mnemonic, dsa, account_status_description, account_branch_name, dormancy_status, product_category

    Customer Information:

    • cus_mnemonic, cus_short_name, cus_name_1, cus_name_2, title, customer_status_description, cust_type, street, address, town_country, post_code, customer_branch_name

    Transaction Details:

    • stmt_entry_id, transaction_code, txn_code_description, txn_code_swift_narrative, txn_code_initiation, txn_code_short_desc, txn_code_stmt_narr, trans_reference, their_reference, narrative, reversal_marker, value_date, date_time

    Financials & Currency:

    • currency, currency_market, amount_fcy (Foreign Currency), amount_lcy (Local Currency), exchange_rate, base_rate, base_rate_code, base_rate_code_desc, fixed_variable_ind

    Audit & Administration:

    • inputter, inputter_name, authoriser, authoriser_name, override, extraction_date, last_update_date, record_status, curr_no, consol_key, company_code

    Account Management:

    • account_officer, account_officer_area, account_officer_level, cust_contact_date, renewal_date, image_reference, regenerate_pass
  4. Reference the ke_accounts_master table schema

    The ke_accounts_master table contains data for Kenyan accounts. The following fields are available in this table:

    • account_number: Account identifier
    • customer: Customer identifier
    • arrangement_id: Arrangement identifier
    • account_title_1: Customer name
    • account_title_2: Customer name
    • short_title: Customer name
    • category: Account category (e.g., Retail/Corp)
    • category_desc: Category description
    • ac_mnemonic: Account mnemonic
    • dsa: DSA identifier
    • authoriser_name: Name of the authoriser
    • image_reference: Reference to account image
    • renewal_date: Date of account renewal
    • account_status_description: Description of the current account status
    • base_rate: Base interest rate
    • base_rate_code: Code for the base rate
    • base_rate_code_desc: Description of the base rate code
    • account_branch_name: Name of the account branch
    • fixed_variable_ind: Indicator for fixed or variable rate
    • dormancy_status: Status of account dormancy
  5. Understand the ke_customer_master table schema

    The ke_customer_master table stores comprehensive data for customer accounts, including unique identifiers, status, and descriptive attributes. Key fields include:

    • extraction_date (timestamp): The ETL Date (t-1) indicating when the data was last extracted. Example: 2023-04-03T21:00:00.000Z.
    • customer_number (varchar(255)): The unique identifier for the customer. Example: 101874.
    • sector (varchar(255)): The business sector in which the customer operates. Examples: 4000, 1100, 2000.
    • sector_description: A text description of the sector code. Examples: FOREIGN TRADE, INDIVIDUALS, MANUFACTURING, FINANCIAL INSTITUTIONS.
  6. STG_AVERAGE_BALANCE table schema reference

    The STG_AVERAGE_BALANCE table tracks daily and cumulative account balances, turnovers, and customer identifiers. Below are the defined columns with their types and descriptions:
    -- Column Definitions for STG_AVERAGE_BALANCE
    
    balance_date        VARCHAR(255)   -- The date of the balance (Example: 20240814)
    account_number       VARCHAR(255)   -- The account number (Example: 1234567890)
    daily_lcy_bal        DECIMAL(22,3)  -- The balance as per that day (Example: 2518.56)
    cumulative_bal_lcy   DECIMAL(22,3)  -- Accumulates daily balances for the entire month; resets on the first day of each month (Example: 68001.12)
    currency             VARCHAR(255)   -- Currency of the balance (Example: KES)
    av_bal_date         TIMESTAMP      -- Timestamp of the balance (Example: 2024-08-14 00:00:00.000)
    customer_number     VARCHAR(255)   -- The customer identifier base number (Example: 123456)
    prev_day_bal_lcy    DECIMAL(22,3)  -- The balance from the previous day (Example: 2518.56)
  7. Calculate and interpret transaction and revenue percentage changes

    The dataset includes three percentage change metrics comparing the recent 6 months (R6) to the previous 6 months (P6) using the formula: ((R6 - P6) / P6) * 100.

    • DEBIT_TXNS_PRCNT: Percentage change in debit transactions.
    • CREDIT_TXNS_PRCNT: Percentage change in credit transactions.
    • REVENUE_PRCNT: Percentage change in revenue generated by the customer for the bank.
  8. Interpret transaction and revenue change trends

    The following fields provide a categorical description of whether a metric has increased or decreased:

    • DEBIT_TXN_CHNGE: Trend for debit transactions.
    • CREDIT_TXN_CHNGE: Trend for credit transactions.
    • REVENUE_CHNGE: Trend for customer revenue.
    Example: "Increased" or "Decreased" (Type: String)
  9. Reference EWS output report fields

    The EWS output report contains the following fields used for customer financial analysis and default prediction:
    [
      { "field": "REPORT_DATE", "type": "Date", "description": "The date when the report was generated.", "example": "2024-09-10" },
      { "field": "CUSTOMER_ID", "type": "String", "description": "Unique identifier for the customer.", "example": "CUST12345" },
      { "field": "TOTAL_LOANBALANCES", "type": "Decimal", "description": "Total balance of all loans for the customer.", "example": "15000.75" },
      { "field": "NUM_ACCOUNTS", "type": "Integer", "description": "Number of accounts held by the customer.", "example": "5" },
      { "field": "DPD", "type": "Integer", "description": "Days Past Due, indicating how many days overdue the payment is.", "example": "30" },
      { "field": "ARREARS", "type": "Decimal", "description": "Total amount of overdue payments.", "example": "200.00" },
      { "field": "DEFAULT_EVENT", "type": "String", "description": "Indicator of whether a default event has occurred.", "example": "Yes" },
      { "field": "DEBIT_COUNT", "type": "Integer", "description": "Number of debit transactions.", "example": "10" },
      { "field": "DEBIT_SUM", "type": "Decimal", "description": "Total sum of debit transactions.", "example": "500.00" },
      { "field": "CREDIT_COUNT", "type": "Integer", "description": "Number of credit transactions.", "example": "8" },
      { "field": "CREDIT_SUM", "type": "Decimal", "description": "Total sum of credit transactions.", "example": "300.00" },
      { "field": "BALANCE", "type": "Decimal", "description": "Current balance of the account.", "example": "1000.00" },
      { "field": "PREDICTED_DEFAULT_PROB", "type": "Decimal", "description": "Probability of default predicted by the model.", "example": "0.15" },
      { "field": "PREDICTED_DEFAULT", "type": "String", "description": "Indicator of whether the model predicts a default.", "example": "No" },
      { "field": "CUSTOMER_NAME", "type": "String", "description": "Full name of the customer.", "example": "John Doe" },
      { "field": "CUSTOMER_TYPE", "type": "String", "description": "Type of the customer (e.g., individual, business).", "example": "Individual" },
      { "field": "BUSINESS_SEGMENT", "type": "String", "description": "Business segment to which the customer belongs.", "example": "Retail" },
      { "field": "CATEGORY_DESC", "type": "String", "description": "Description of the category under which the customer is classified.", "example": "Premium" },
      { "field": "PRODUCT_ID", "type": "String", "description": "Unique identifier for the product associated with the customer.", "example": "PROD67890" },
      { "field": "SECTOR", "type": "String", "description": "Sector in which the customer operates or is categorized.", "example": "Finance" },
      { "field": "INDUSTRY_DESCRIPTION", "type": "String", "description": "Description of the industry in which the customer operates.", "example": "Banking" },
      { "field": "EARLY_SIGN", "type": "String", "description": "Early signs of potential default or financial trouble.", "example": "Yes" }
    ]
  10. Interpret churn model predictions and probabilities

    The churn model provides a binary prediction and the associated probabilities:

    • PREDICTED: Binary churn prediction. 1 indicates high likelihood of churn (probability > 0.5), and 0 indicates low likelihood (probability ≤ 0.5).
    • PROBABILITIES_0: The probability that the customer will NOT churn.
    • PROBABILITIES_1: The probability that the customer WILL churn.