ledgers
ledger_id PK
name
created_at, meta_data
A group of balances
identity
identity_id PK
identity_type, category
name, email, phone
address fields
People and organizations
balances
balance_id PK
ledger_id → ledgers
identity_id → identity
balance, credit, debit
currency, indicator, inflight
Stores of value. The wallets.
transactions
transaction_id PK
source → balances
destination → balances
amount, precise_amount, precision
currency, status, reference
Source is money out. Destination is money in.
Balances belong to a ledger and optionally an identity. Each lake transaction row has a source wallet and a destination wallet.
How to join them
When a report needs columns from more than one table, join those tables on a shared ID. For example, a payment stores wallet IDs, but the owner’s name is onidentity. A join brings them into one result.
Every lake transaction row stores one source wallet and one destination wallet. Source is where money leaves. Destination is where money arrives. For payments that split across many wallets, see Multiple sources and Multiple destinations.
Follow these steps to show each applied payment with the destination wallet and the owner’s name. Collapse balances and identity to one row per ID before you join, so multi-day copies do not multiply payment rows. See How the lake works.
Start from payments
transactions and pick the payment fields you need.Collapse wallets and owners
balance_id and one row per identity_id. Use ANY_VALUE for display fields. Do not order by created_at to pick a latest snapshot.Join destination wallet and owner
destination to the collapsed wallet, then the wallet to the collapsed owner.Put it together
- Use a join from
transactions.sourceto a one-row-per-idbalancesset to see the wallet a payment left. - Use a join from
transactions.destinationto a one-row-per-idbalancesset to see the wallet a payment entered. - Use a join from
balances.ledger_idto a one-row-per-idledgersset to see which ledger a wallet belongs to. - Use a join from
balances.identity_idto a one-row-per-ididentityset to see the owner of a wallet.
Columns you can select
Use the tabs below to see what each table stores and when to select each column. Each tab is one lake table. When a report needs columns from more than one table, join on a shared ID. Collapse repeating entity tables to one row per ID first. For example, jointransactions.destination to a one-row-per-id balances set, then to a one-row-per-id identity set, to show a payment with the receiving wallet and owner.
- transactions
- balances
- ledgers
- identity
SELECT * result), you may see columns that start with _blnk_ or __lake_. Those are internal lake fields and can change. Select the named columns in the tabs above instead.Transaction status
Most reports filter onstatus. Core stores each state as its own row. See Transaction lifecycle.
From QUEUED, a transaction can become INFLIGHT, APPLIED, or REJECTED. From INFLIGHT, it can become APPLIED or VOID. APPLIED, VOID, and REJECTED are terminal. An applied transaction does not later become void or rejected.

APPLIED, VOID, and REJECTED are terminal. Only INFLIGHT is money still on hold.