The Data Lake is available only on managed instances and to Enterprise customers. It is not included with connected self-hosted Cores without an Enterprise license.
What you can query
The lake exposes four tables:transactions, balances, ledgers, and identity. Open Schema to see the columns and how they join.
Records are written to your ledger before they become available in the Data Lake; this means that a payment can already exist on the ledger without appearing in Insights yet. Keep that delay in mind when you report on recent activity.
How the date range affects your query
The date range in the Insights toolbar determines which period of history your query can access. Your SQL then filters and analyzes the records within that selection. On every table, that range applies tocreated_at:
- On
transactions,created_atis when that lifecycle row was created in your ledger. A September range is payments that moved through a status in September. - On
balances,ledgers, andidentity,created_atis when the wallet, ledger, or identity was created. A September range pulls records created in September, not every record that existed in September.
How transactions appear
The Data Lake can contain multiple records for a single payment, one per lifecycle stage. A payment may have aQUEUED row followed by an APPLIED row. Those describe the same payment at different stages. Counting both incorrectly counts the payment twice.
For example, if you want to report on completed transactions, your query must filter for APPLIED records only:
WHERE filter, the same payment is counted once as QUEUED and again as APPLIED. For other reports, change the status to the stage you care about. See Transaction lifecycle.
To follow an inflight payment to its outcome, connect related rows with parent_transaction or meta_data.QUEUED_PARENT_TRANSACTION. Those rows can fall on different dates. A hold on September 30 that commits on October 1 needs a range that includes both days.
outcome_id comes back empty and the hold looks unresolved. Widen the range to include both days.
How balances appear
A wallet keeps onebalance_id for its lifetime. Use the balances table to count wallets, filter by ledger or currency, and join transactions to the wallet, ledger, or identity they belong to.
The toolbar range follows created_at, so you can also report on wallets created in that period:
Wallets created by currency
balances to transactions when you need ledger or owner context on volume. This totals applied volume that touched wallets in one ledger:
Applied volume for a ledger
source or destination only if you want outflow or inflow.
Use ledgers and identity the same way: join them when a report needs a ledger name or an owner.
Write queries that match the data
Keep these in mind when you write SQL:- The lake is for history, not live holdings. Do not treat
balances.balanceas the current amount in a wallet. Use the Ledger API for that. - Each transaction status is its own row. Filter by
status, and useparent_transactionwhen you need commit or void outcomes. - The date range follows
created_at. On wallets, that is creation time. A short range will omit older wallets, even if they still exist on the ledger. - Widen the range when you follow a parent and its children. Inflight commits and voids create new rows. If the outcome sits outside the range, the report can miss the resolution.
- Dates and amounts can be typed differently across days. Wrap them in
TRY_CASTso one mismatched row does not fail the whole query. See Accepted SQL.