Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The aiimi Data Product

Maintained by: The aiimi Data Engineers

Table overview

Entity IDEntity NameDescriptionEntity TypePrimary Key(s)
1transactionsTransaction Fact Table One line per transaction, but only transactions that have actually happened.goldtransaction_id
2scheduled_transactionsScheduled Transaction Fact Table One line per transaction, but only transactions that have not actually happened.goldscheduled_transaction_id
3accountsAccounts Dimension Table Holds all the information relating to an account, type 1, 1 line per account.goldaccount_id
4categoriesCategories Dimension Table Holds all the information relating to a category, type 1, 1 line per category.goldcategory_id
5payeesPayees Dimension Table Holds all the information relating to a payee, type 1, 1 line per payee.goldpayee_id
6datesGood old fashioned Date Dimensiongolddate_id
7accountsSilver Accounts Table Other random information.silver
8categoriesSilver Categories Table Other random information.silver
9payeesSilver Payees Table Other random information.silver
10scheduled_transactionsSilver Scheduled Transactions Table Other random information.silver
11transactionsSilver Transactions Table Other random information.silver
12accountsbronze
13categoriesbronze
14payeesbronze
15scheduled_transactionsbronze
16transactionsbronze

Entity Relationship Diagram

erDiagram
    transactions {
        string transaction_id PK
        int account_id
        int category_id
        int payee_id
        int date_id
        decimal amount
        boolean cleared
        boolean approved
        boolean deleted
        string memo
        string flag_color
        string transfer_account_id
    }
    scheduled_transactions {
        int scheduled_transaction_id PK
        int account_id
        int category_id
        int payee_id
        str date_first
        str date_next
        decimal amount
        string frequency
        boolean deleted
        text memo
        string flag_color
        str transfer_account_id
    }
    accounts {
        int account_id PK
        string account_name
        string account_type
        boolean on_budget
        boolean closed
        text note
        decimal balance
        decimal cleared_balance
        decimal uncleared_balance
        boolean deleted
    }
    categories {
        int category_id PK
        string category_name
        string category_group_name
        boolean hidden
        text note
        decimal budgeted
        decimal activity
        decimal balance
        boolean deleted
    }
    payees {
        int payee_id PK
        string payee_name
        boolean deleted
    }
    dates {
        string date_id PK
        date date
        int year
        int month
        int day
        boolean is_weekday
        int weekday
    }
    transactions ||--|| payees : "payee_id"
    transactions ||--|| dates : "date_id"
    scheduled_transactions ||--|| payees : "payee_id"
    transactions ||--|| categories : "category_id"
    transactions ||--|| accounts : "account_id"
    scheduled_transactions ||--|| accounts : "account_id"
    scheduled_transactions ||--|| categories : "category_id"

Lineage Report

%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
flowchart LR

1[1 gold transactions]
2[2 gold scheduled_transactions]
3[3 gold accounts]
4[4 gold categories]
5[5 gold payees]
6[6 gold dates]
7[7 silver accounts]
8[8 silver categories]
9[9 silver payees]
10[10 silver scheduled_transactions]
11[11 silver transactions]
12[12 bronze accounts]
13[13 bronze categories]
14[14 bronze payees]
15[15 bronze scheduled_transactions]
16[16 bronze transactions]


11 --> 1
10 --> 2
7 --> 3
8 --> 4
9 --> 5
12 --> 7
13 --> 8
14 --> 9
15 --> 10
16 --> 11