The VIRTUAL_ACCOUNT arm of bankAccountView — per-entity virtual
accounts at Victor and RouteFusion, with balances implied from the
bank_transaction feed.
This arm carries one of the two hierarchy edges the schema actually proves.
victor_account.victorLedgerProgramId is documented as "Only on FBO rows —
backs the Victor ledger program for virtual accounts", and
data.victorLedgerProgramId here is its counterpart, so the edge is asserted
from both sides rather than inferred. It is guarded on
data ->> 'provider' = 'VICTOR': a RouteFusion VA has no parent to point at
— route_fusion_program carries a bankId and no account number, so there
is no account for the edge to reach (§ 4.5).
Only Victor-provider rows contribute to the feed at all. The Victor sync
resolves each side of a transaction against victor_account ∪
Victor-provider virtual_account and discards the rest, so a
ROUTE_FUSION-provider VA is keyable and correlates to zero rows — a true
0 / 0 / 0 with a transaction_count of 0, not a measurement failure.
dbmate owns the DDL: the body below is mirrored by
20260814200000_bank_account_view.sql. securityInvoker is required — see
victorAccountBankAccountView.
The
VIRTUAL_ACCOUNTarm of bankAccountView — per-entity virtual accounts at Victor and RouteFusion, with balances implied from thebank_transactionfeed.This arm carries one of the two hierarchy edges the schema actually proves.
victor_account.victorLedgerProgramIdis documented as "Only on FBO rows — backs the Victor ledger program for virtual accounts", anddata.victorLedgerProgramIdhere is its counterpart, so the edge is asserted from both sides rather than inferred. It is guarded ondata ->> 'provider' = 'VICTOR': a RouteFusion VA has no parent to point at —route_fusion_programcarries abankIdand no account number, so there is no account for the edge to reach (§ 4.5).Only Victor-provider rows contribute to the feed at all. The Victor sync resolves each side of a transaction against
victor_account∪ Victor-providervirtual_accountand discards the rest, so a ROUTE_FUSION-provider VA is keyable and correlates to zero rows — a true0 / 0 / 0with atransaction_countof0, not a measurement failure.dbmate owns the DDL: the body below is mirrored by
20260814200000_bank_account_view.sql.securityInvokeris required — see victorAccountBankAccountView.