Proving the Data Plane: A Databricks LTAP for Asia's Real-Time Markets

Agenda

  1. Demo Purpose
  2. Demonstration Outcome
  3. Reference Architecture
  4. Prerequisites and Product Boundaries
  5. Stage One: Prepare Identity and Workspace Governance
  6. Stage Two: Create the Unity Catalog Structure
  7. Stage Three: Create Synthetic Reference Data
  8. Stage Four: Create Synthetic Order-Book Events
  9. Stage Five: Build the Durable Normalization Path
  10. Stage Six: Configure the Streaming Path
  11. Stage Seven: Create Certified Analytical Products
  12. Stage Eight: Create Lakehouse Real-Time Serving
  13. Stage Nine: Create the Lakebase Project
  14. Stage Ten: Connect Lakebase and the Lakehouse
  15. Stage Eleven: Build the Databricks App
  16. Stage Twelve: Build the AI/BI Dashboard
  17. Stage Thirteen: Run the Healthy-State Demo
  18. Stage Fourteen: Inject a Sequence Gap
  19. Stage Fifteen: Recover the Book
  20. Stage Sixteen: Simulate Lakebase Failure
  21. Stage Seventeen: Simulate Model Failure
  22. Stage Eighteen: Test Permissions and Entitlements
  23. Stage Nineteen: Test Performance and Recovery
  24. Stage Twenty: Production Hardening
  25. Live Demonstration Script
  26. Demo Acceptance Criteria

Key Takeaway

The demo succeeds when specialized transactional, streaming, analytical, serving, and governance components report one synchronized, truthful operating state under healthy conditions and controlled failure.

Demo Purpose

Architecture prototype ➔ Synthetic markets ➔ Governance and failure ➔ No live trading ➔ Provable operating state

This technical demonstration converts the architecture in “One Governed Data Plane for Asia's Real-Time Markets” into an executable non-production prototype. It demonstrates how an international trading desk can combine transactional application state, streaming market events, large-scale analytical history, low-latency serving, and common governance without pretending that OLTP and OLAP are the same workload.

The demonstration follows the operating discipline of a former military combat engineer turned institutional-grade trader. A route is not operational because the first segment looks clear. A liquidity signal is not decision-grade because it arrived quickly. The system must prove market-data continuity, current analytical quality, transactional durability, entitlement, and recoverability before a trader or control function relies on it.

All market, instrument, venue, position, limit, and workflow records in this demonstration are synthetic. The demo does not connect to a live exchange, broker, order-management system, bank, or payment network. It has no order-entry or fund-movement capability. Its purpose is to show architecture, governance, event processing, application state, analytical serving, and controlled failure behavior.

Demonstration Outcome

Regional liquidity view ➔ Lakebase workflow ➔ Sequence gap ➔ Read-only outage ➔ Synchronized truth

The final application displays synthetic liquidity conditions for Hong Kong, Singapore, Tokyo, Seoul, and one ASEAN venue. It shows executable depth, bid-ask spread, order-book imbalance, queue pressure, venue freshness, sequence quality, cross-venue divergence, estimated impact, and current alert state.

The analytical layer stores market history and calculated features in governed Delta tables. A low-latency serving warehouse provides selective analytical queries to a dashboard and application. Lakebase Postgres stores mutable workflow state such as watchlists, alerts, acknowledgements, investigations, and human decisions. Unity Catalog controls analytical assets, lineage, discovery, and access. PostgreSQL roles and application authorization protect transactional objects. The two control models are designed together rather than assumed to be identical.

The live demonstration begins in a healthy state. It then introduces a sequence gap in the Hong Kong order book. The streaming process detects the gap and changes the venue quality state to DEGRADED. Cross-venue calculations that depend on Hong Kong are blocked. The last valid analytical values remain available but are explicitly marked stale and invalid for current decisions.

The demonstration then simulates a Lakebase outage. Analytical market information remains readable, but the application stops accepting alert acknowledgements because it cannot commit them durably. Finally, the model endpoint becomes unavailable. Deterministic measures remain visible while model-dependent impact estimates become unavailable. The system succeeds when every surface describes the same current capability.

Reference Architecture

Event plane ➔ Transactional plane ➔ Analytical plane ➔ Control plane ➔ Separate write authority

The event plane receives order-book, trade, FX, position, limit, treasury, and settlement events. Kafka, Kinesis, Event Hubs, or another approved event source can be used in production. The demo uses governed synthetic source tables and an optional Kafka-compatible event stream.

The transactional plane uses Lakebase Postgres. It stores trader watchlists, alert definitions, alert instances, acknowledgement records, investigation cases, comments, workflow ownership, and approval status.

The analytical plane uses Delta Lake and Lakeflow-compatible transformations. It stores immutable raw events, normalized events, reconstructed order books, venue-health state, liquidity features, and historical evidence. Lakehouse Real-Time can serve eligible selective queries when the Beta is approved and available. A standard serverless SQL warehouse remains the fallback for broader analytical functionality.

The control plane uses Unity Catalog, account identities, service principals, catalog permissions, tags, lineage, certification, audit logs, private connectivity, secret management, and workload-specific quality controls.

LTAP does not remove workload specialization. Lakebase owns mutable application state. The lakehouse owns analytical history and certified features. The application assembles the experience without creating ambiguity about which system owns each write.

Prerequisites and Product Boundaries

Non-production workspace ➔ Optional real-time serving ➔ Micro-batch fallback ➔ High availability ➔ Preview recovery boundary

Use a non-production Databricks workspace attached to a Unity Catalog metastore. Create or select a serverless SQL warehouse for setup and general analysis. Lakebase must be available in the selected cloud and region. Lakehouse Real-Time is optional for the demo and should only be enabled when the Beta is supported and approved.

For direct Structured Streaming real-time mode on AWS, validate the current requirements before building compute. The source architecture paper records that direct setup requires compatible classic compute, autoscaling disabled, Photon disabled, spot instances disabled, and explicit real-time mode configuration. Supported sources, sinks, output modes, joins, and operators are narrower than ordinary micro-batch Structured Streaming. The demo therefore includes a portable micro-batch path and an optional real-time path.

Lakebase high availability and cross-region disaster recovery are different capabilities. High availability protects against compute or availability-zone failure inside one region. Cross-region Lakebase disaster recovery was Private Preview and not intended for production as of October 9, 2026. Do not present the DR preview as a production guarantee.

Stage One: Prepare Identity and Workspace Governance

Metastore attachment ➔ Duty groups ➔ Service principals ➔ Identity separation ➔ Governance gate

Open the Databricks account console and confirm that the demo workspace is attached to the expected Unity Catalog metastore. Synchronize or create the following duty-based groups.

asia_market_platform_admins asia_market_data_engineers asia_market_domain_owners asia_market_traders asia_market_risk_reviewers asia_market_operations asia_market_app_builders asia_market_consumers

Create separate service principals for ingestion, streaming, durable pipelines, application runtime, and deployment. Do not run the application or pipeline with a personal identity.

Open SQL Editor with Unity Catalog-compatible compute and verify the metastore.

SELECT CURRENT_METASTORE();

The demo should stop if this query does not return the expected metastore. Governance, lineage, and controlled sharing depend on the correct attachment.

Stage Two: Create the Unity Catalog Structure

Demo catalog ➔ Domain schemas ➔ Certified consumer access ➔ Domain ownership ➔ Governed tags

Create one demonstration catalog with schemas that separate raw events, trusted data, liquidity products, risk context, evidence, and application-facing assets.

CREATE CATALOG IF NOT EXISTS asia_ltap_demo;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.raw;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.trusted;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.liquidity;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.risk;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.evidence;

CREATE SCHEMA IF NOT EXISTS asia_ltap_demo.app_serving;

Add descriptions that make the synthetic and non-trading nature explicit.

COMMENT ON CATALOG asia_ltap_demo
IS 'Synthetic LTAP demonstration for governed Asian real-time market analytics. Not for live trading.';

COMMENT ON SCHEMA asia_ltap_demo.raw
IS 'Immutable synthetic market and control events with source sequence and event time.';

COMMENT ON SCHEMA asia_ltap_demo.liquidity
IS 'Certified liquidity-depth features, venue health, and cross-venue analytical products.';

COMMENT ON SCHEMA asia_ltap_demo.evidence
IS 'Point-in-time evidence, data-quality incidents, model versions, and investigation records.';

Grant consumers read access only to certified application-serving and liquidity objects. Keep raw events restricted to engineering and approved control reviewers.

GRANT USE CATALOG ON CATALOG asia_ltap_demo TO `asia_market_consumers`;

GRANT USE SCHEMA ON SCHEMA asia_ltap_demo.liquidity TO `asia_market_consumers`;

GRANT USE SCHEMA ON SCHEMA asia_ltap_demo.app_serving TO `asia_market_consumers`;

GRANT SELECT ON SCHEMA asia_ltap_demo.liquidity TO `asia_market_consumers`;

GRANT SELECT ON SCHEMA asia_ltap_demo.app_serving TO `asia_market_consumers`;

Transfer ownership of certified products to the domain-owner group. Add governed tags for jurisdiction, market-data license, legal entity, confidentiality, permitted purpose, retention class, and source authority. In a production implementation, use workspace bindings, row filters, column masks, and attribute-based policies where supported and approved.

Stage Three: Create Synthetic Reference Data

Canonical instruments ➔ Normalized FX ➔ Desk limits ➔ Funding state ➔ Synthetic reference

Create a canonical instrument table. The same product is represented by a synthetic common instrument identifier across venues. Venue symbols remain preserved.

CREATE OR REPLACE TABLE asia_ltap_demo.trusted.instrument_reference AS
SELECT * FROM VALUES
    ('ASIA_EQ_001', 'HK', 'HKX', 'HKA', 'HKD', 0.01, 100, 'T+2', 'Asia/Hong_Kong'),
    ('ASIA_EQ_001', 'SG', 'SGX', 'SGA', 'SGD', 0.01, 100, 'T+2', 'Asia/Singapore'),
    ('ASIA_EQ_001', 'JP', 'JPX', 'JPA', 'JPY', 1.00, 100, 'T+2', 'Asia/Tokyo'),
    ('ASIA_EQ_001', 'KR', 'KRX', 'KRA', 'KRW', 1.00, 1, 'T+2', 'Asia/Seoul'),
    ('ASIA_EQ_001', 'ASEAN', 'AX', 'AXA', 'USD', 0.01, 100, 'T+2', 'Asia/Singapore')
AS t(instrument_id, jurisdiction, venue, venue_symbol, currency, tick_size, lot_size, settlement_cycle, market_timezone);

Create normalized FX rates so venue prices can be compared in a synthetic USD base currency.

CREATE OR REPLACE TABLE asia_ltap_demo.trusted.fx_rate AS
SELECT * FROM VALUES
    ('HKD', 'USD', 0.1280, current_timestamp()),
    ('SGD', 'USD', 0.7700, current_timestamp()),
    ('JPY', 'USD', 0.0067, current_timestamp()),
    ('KRW', 'USD', 0.00074, current_timestamp()),
    ('USD', 'USD', 1.0000, current_timestamp())
AS t(base_currency, quote_currency, rate, event_time);

Create synthetic risk and funding context.

CREATE OR REPLACE TABLE asia_ltap_demo.risk.desk_limit AS
SELECT * FROM VALUES
    ('ASIA_DESK', 'ASIA_EQ_001', 5000000.00, 1750000.00, current_timestamp()),
    ('ASIA_DESK', 'ALL_INSTRUMENTS', 15000000.00, 6200000.00, current_timestamp())
AS t(desk_id, scope_id, approved_limit_usd, used_limit_usd, update_time);

CREATE OR REPLACE TABLE asia_ltap_demo.risk.funding_state AS
SELECT * FROM VALUES
    ('HK_ENTITY', 'USD', 2000000.00, 250000.00, 150000.00, current_timestamp()),
    ('SG_ENTITY', 'USD', 3500000.00, 300000.00, 200000.00, current_timestamp()),
    ('JP_ENTITY', 'USD', 1800000.00, 150000.00, 100000.00, current_timestamp()),
    ('KR_ENTITY', 'USD', 2200000.00, 400000.00, 200000.00, current_timestamp())
AS t(legal_entity, currency, total_balance, restricted_balance, reserved_balance, update_time);

Stage Four: Create Synthetic Order-Book Events

Event envelope ➔ Source sequence ➔ Event time ➔ Healthy venue books ➔ Boundary capture

The raw event table preserves event identifiers, source sequence, event time, ingestion time, venue, side, price, quantity, level, and update type.

CREATE OR REPLACE TABLE asia_ltap_demo.raw.order_book_event (
    event_id STRING,
    instrument_id STRING,
    venue STRING,
    source_sequence BIGINT,
    event_time TIMESTAMP,
    ingestion_time TIMESTAMP,
    side STRING,
    price DECIMAL(20, 6),
    quantity DECIMAL(20, 4),
    book_level INT,
    update_type STRING,
    source_status STRING
) USING DELTA;

Load a healthy sequence for five venues. Prices are expressed in local currency.

INSERT INTO asia_ltap_demo.raw.order_book_event VALUES ('HK-100', 'ASIA_EQ_001', 'HKX', 100, current_timestamp(), current_timestamp(), 'BID', 780.00, 5000, 1, 'UPSERT', 'LIVE'), ('HK-101', 'ASIA_EQ_001', 'HKX', 101, current_timestamp(), current_timestamp(), 'ASK', 780.50, 4500, 1, 'UPSERT', 'LIVE'), ('SG-200', 'ASIA_EQ_001', 'SGX', 200, current_timestamp(), current_timestamp(), 'BID', 129.80, 6500, 1, 'UPSERT', 'LIVE'), ('SG-201', 'ASIA_EQ_001', 'SGX', 201, current_timestamp(), current_timestamp(), 'ASK', 129.90, 6000, 1, 'UPSERT', 'LIVE'), ('JP-300', 'ASIA_EQ_001', 'JPX', 300, current_timestamp(), current_timestamp(), 'BID', 14920, 5200, 1, 'UPSERT', 'LIVE'), ('JP-301', 'ASIA_EQ_001', 'JPX', 301, current_timestamp(), current_timestamp(), 'ASK', 14935, 4800, 1, 'UPSERT', 'LIVE'), ('KR-400', 'ASIA_EQ_001', 'KRX', 400, current_timestamp(), current_timestamp(), 'BID', 135100, 7000, 1, 'UPSERT', 'LIVE'), ('KR-401', 'ASIA_EQ_001', 'KRX', 401, current_timestamp(), current_timestamp(), 'ASK', 135250, 6800, 1, 'UPSERT', 'LIVE'), ('AX-500', 'ASIA_EQ_001', 'AX', 500, current_timestamp(), current_timestamp(), 'BID', 99.70, 3000, 1, 'UPSERT', 'LIVE'), ('AX-501', 'ASIA_EQ_001', 'AX', 501, current_timestamp(), current_timestamp(), 'ASK', 99.90, 2800, 1, 'UPSERT', 'LIVE');

In production, the source would be Kafka, Kinesis, Event Hubs, or an approved vendor connector. The source sequence and event time must be captured at the boundary. Do not generate institutional sequence numbers after ingestion.

Stage Five: Build the Durable Normalization Path

USD normalization ➔ Sequence health ➔ Top-of-book features ➔ Valid venues only ➔ Cross-venue state

Create a trusted normalized view that converts venue prices into USD while preserving local values and quality context.

CREATE OR REPLACE VIEW asia_ltap_demo.trusted.normalized_order_book AS SELECT e.event_id, e.instrument_id, e.venue, i.jurisdiction, i.currency, e.source_sequence, e.event_time, e.ingestion_time, e.side, e.price AS local_price, e.price * f.rate AS usd_price, e.quantity, e.book_level, e.update_type, e.source_status, timestampdiff(MILLISECOND, e.event_time, e.ingestion_time) AS ingestion_latency_ms FROM asia_ltap_demo.raw.order_book_event e JOIN asia_ltap_demo.trusted.instrument_reference i ON e.instrument_id = i.instrument_id AND e.venue = i.venue JOIN asia_ltap_demo.trusted.fx_rate f ON i.currency = f.base_currency AND f.quote_currency = 'USD';

Create a sequence-health view. The demo uses a simplified sequence rule. A production implementation must account for venue reset messages, independent channels, snapshots, retransmission, trading sessions, and vendor-specific sequence semantics.

CREATE OR REPLACE VIEW asia_ltap_demo.trusted.sequence_health AS WITH ordered AS (
SELECT venue, instrument_id, source_sequence, event_time, LAG(source_sequence) OVER ( PARTITION BY venue, instrument_id ORDER BY source_sequence ) AS previous_sequence FROM asia_ltap_demo.raw.order_book_event ),
evaluated AS (
SELECT venue, instrument_id, MAX(event_time) AS latest_event_time, MAX(CASE WHEN previous_sequence IS NOT NULL AND source_sequence <> previous_sequence + 1 THEN 1 ELSE 0 END) AS gap_detected FROM ordered GROUP BY venue, instrument_id )
SELECT venue, instrument_id, latest_event_time, CASE WHEN gap_detected = 1 THEN 'DEGRADED_SEQUENCE_GAP'
    ELSE 'VALID'
END AS quality_state, timestampdiff(SECOND, latest_event_time, current_timestamp()) AS age_seconds FROM evaluated;

Create venue-level top-of-book features.

CREATE OR REPLACE VIEW asia_ltap_demo.liquidity.venue_top_of_book AS WITH book AS (
SELECT instrument_id, venue, MAX(CASE WHEN side = 'BID' AND book_level = 1 THEN usd_price END) AS best_bid_usd, MIN(CASE WHEN side = 'ASK' AND book_level = 1 THEN usd_price END) AS best_ask_usd, MAX(CASE WHEN side = 'BID' AND book_level = 1 THEN quantity END) AS bid_quantity, MAX(CASE WHEN side = 'ASK' AND book_level = 1 THEN quantity END) AS ask_quantity, MAX(event_time) AS latest_event_time FROM asia_ltap_demo.trusted.normalized_order_book GROUP BY instrument_id, venue )
SELECT b.*, b.best_ask_usd - b.best_bid_usd AS spread_usd, ((b.best_ask_usd - b.best_bid_usd) / NULLIF((b.best_ask_usd + b.best_bid_usd) / 2, 0)) * 10000 AS spread_bps, (b.bid_quantity - b.ask_quantity) / NULLIF(b.bid_quantity + b.ask_quantity, 0) AS order_book_imbalance, LEAST(b.bid_quantity, b.ask_quantity) AS executable_depth_units, s.quality_state, s.age_seconds FROM book b JOIN asia_ltap_demo.trusted.sequence_health s USING (venue, instrument_id);

Create a current cross-venue comparison that only treats valid venues as decision-grade.

CREATE OR REPLACE VIEW asia_ltap_demo.liquidity.cross_venue_state AS WITH valid_books AS (
SELECT *
FROM asia_ltap_demo.liquidity.venue_top_of_book WHERE quality_state = 'VALID'
    AND age_seconds <= 10 ),
market AS (
SELECT instrument_id, MAX(best_bid_usd) AS highest_bid_usd, MIN(best_ask_usd) AS lowest_ask_usd, AVG((best_bid_usd + best_ask_usd) / 2) AS average_mid_usd, COUNT(*) AS valid_venue_count, SUM(executable_depth_units) AS total_visible_depth_units FROM valid_books GROUP BY instrument_id )
SELECT instrument_id, highest_bid_usd, lowest_ask_usd, highest_bid_usd - lowest_ask_usd AS cross_venue_price_difference_usd, average_mid_usd, valid_venue_count, total_visible_depth_units, CASE WHEN valid_venue_count < 3 THEN 'BLOCKED_INSUFFICIENT_VALID_VENUES'
    WHEN highest_bid_usd > lowest_ask_usd THEN 'DIVERGENCE_RESEARCH_REQUIRED'
    ELSE 'NORMAL'
END AS analytical_state, current_timestamp() AS calculation_time FROM market;

Stage Six: Configure the Streaming Path

Micro-batch path ➔ Narrow real-time query ➔ Checkpoint and replay ➔ Measured latency ➔ Proven fallback

For a portable demonstration, create a Structured Streaming notebook that reads a Delta change feed or Kafka-compatible synthetic topic in micro-batch mode. Micro-batch remains the broadest and easiest path for a workshop.

from pyspark.sql import functions as F

source = (
    spark.readStream
         .table("asia_ltap_demo.raw.order_book_event")
)

normalized = (
    source
    .withColumn("processing_time", F.current_timestamp())
    .withColumn(
        "event_age_ms",
        (F.col("processing_time").cast("double") -
         F.col("event_time").cast("double")) * 1000
    )
    .filter(F.col("source_status") == "LIVE")
)

query = (
    normalized.writeStream
    .option("checkpointLocation", "/Volumes/asia_ltap_demo/evidence/checkpoints/order_book_demo")
    .trigger(processingTime="1 second")
    .toTable("asia_ltap_demo.trusted.order_book_stream_observation")
)

This code illustrates the path, but the raw Delta table must be configured appropriately for streaming behavior in the selected environment. In a production design, ingest directly from Kafka, Kinesis, or Event Hubs and preserve source schema and sequencing.

For the optional real-time mode path, create dedicated classic compute that satisfies the current cloud requirements. Enable the feature only after validating the source, sink, operator, output mode, and runtime support. Keep the first real-time query intentionally narrow. It should detect sequence gaps, calculate event age, and emit venue-health state. Do not begin with full historical book reconstruction.

A representative trigger pattern is shown below. Validate the exact API against the current runtime before execution.

rt_query = (
    normalized.writeStream
    .outputMode("update")
    .option("checkpointLocation", "/Volumes/asia_ltap_demo/evidence/checkpoints/order_book_rtm")
    .trigger(realTime="5 minutes")
    .foreachBatch(process_current_state)
    .start()
)

Benchmark source-to-feature latency, throughput, checkpoint behavior, replay time, state size, and recovery under sequence gaps. Keep micro-batch as the fallback until real-time mode proves a business-relevant improvement.

Stage Seven: Create Certified Analytical Products

Venue quality ➔ Liquidity features ➔ Risk headroom ➔ Funding context ➔ Certified decision state

Create an application-facing view that brings together venue quality, liquidity features, risk headroom, and funding context.

CREATE OR REPLACE VIEW asia_ltap_demo.app_serving.market_control_view AS WITH desk AS (
SELECT MAX(CASE WHEN scope_id = 'ASIA_EQ_001' THEN approved_limit_usd END) AS instrument_limit, MAX(CASE WHEN scope_id = 'ASIA_EQ_001' THEN used_limit_usd END) AS instrument_used FROM asia_ltap_demo.risk.desk_limit WHERE desk_id = 'ASIA_DESK' ),
funding AS (
SELECT SUM(total_balance - restricted_balance - reserved_balance) AS deployable_funding_usd, MAX(update_time) AS funding_update_time FROM asia_ltap_demo.risk.funding_state )
SELECT b.instrument_id, b.venue, b.best_bid_usd, b.best_ask_usd, b.spread_bps, b.order_book_imbalance, b.executable_depth_units, b.quality_state, b.age_seconds, d.instrument_limit - d.instrument_used AS remaining_limit_usd, f.deployable_funding_usd, timestampdiff(SECOND, f.funding_update_time, current_timestamp()) AS funding_age_seconds, CASE WHEN b.quality_state <> 'VALID'
    THEN 'BLOCKED_MARKET_DATA_QUALITY'
    WHEN b.age_seconds > 10 THEN 'BLOCKED_STALE_MARKET_DATA'
    WHEN timestampdiff(SECOND, f.funding_update_time, current_timestamp()) > 60 THEN 'BLOCKED_STALE_FUNDING'
    WHEN d.instrument_limit - d.instrument_used <= 0 THEN 'BLOCKED_LIMIT'
    ELSE 'RESEARCH_VALID'
END AS decision_state, current_timestamp() AS calculation_time FROM asia_ltap_demo.liquidity.venue_top_of_book b CROSS JOIN desk d CROSS JOIN funding f;

Open Catalog Explorer, add comments to every decision field, and mark the certified serving assets through the organization's certification workflow. Inspect lineage from raw order-book events to the application-facing view.

Stage Eight: Create Lakehouse Real-Time Serving

Real-time warehouse ➔ Selective queries ➔ Tail latency ➔ Bounded autoscaling ➔ Standard warehouse fallback

If Lakehouse Real-Time is enabled and approved in the workspace, open Compute, select SQL Warehouses, and create a Real-Time warehouse. Choose a query size appropriate to the demo, set a bounded autoscaling limit, configure auto-stop, and grant CAN USE only to the demo groups and application service principal.

Run selective queries first.

SELECT venue, spread_bps, order_book_imbalance, executable_depth_units, quality_state, decision_state FROM asia_ltap_demo.app_serving.market_control_view WHERE instrument_id = 'ASIA_EQ_001'
ORDER BY venue;

Record p50, p95, and p99 response times under increasing concurrency. Do not use one warm query as evidence of production latency. If a query hits a Beta guardrail or uses unsupported behavior, move it to a standard serverless warehouse and redesign the data product.

Stage Nine: Create the Lakebase Project

Lakebase project ➔ Workflow schemas ➔ Alerts and cases ➔ Query indexes ➔ Separate PostgreSQL roles

Open Lakebase in the workspace and create a project named asia-liquidity-operations. Create a production branch for the demo and a database named liquidity_app.

Create one read-write endpoint. For a workshop, a small bounded autoscaling range is sufficient. For a production-like test, disable scale-to-zero if cold starts conflict with the service target. High availability should only be enabled after validating its regional availability and operational behavior.

Connect using the built-in SQL Editor or a standard PostgreSQL client. Create application schemas and tables.

CREATE SCHEMA IF NOT EXISTS workflow;

CREATE SCHEMA IF NOT EXISTS configuration;

CREATE TABLE IF NOT EXISTS configuration.watchlist ( watchlist_id UUID PRIMARY KEY, owner_subject VARCHAR(200) NOT NULL, instrument_id VARCHAR(100) NOT NULL, venue VARCHAR(50), created_at TIMESTAMPTZ NOT NULL DEFAULT now(), active BOOLEAN NOT NULL DEFAULT true );

CREATE TABLE IF NOT EXISTS workflow.alert ( alert_id UUID PRIMARY KEY, alert_type VARCHAR(100) NOT NULL, instrument_id VARCHAR(100) NOT NULL, venue VARCHAR(50), source_event_id VARCHAR(200), quality_state VARCHAR(100) NOT NULL, status VARCHAR(50) NOT NULL DEFAULT 'OPEN', created_at TIMESTAMPTZ NOT NULL DEFAULT now(), updated_at TIMESTAMPTZ NOT NULL DEFAULT now(), version BIGINT NOT NULL DEFAULT 1 );

CREATE TABLE IF NOT EXISTS workflow.alert_acknowledgement ( acknowledgement_id UUID PRIMARY KEY, alert_id UUID NOT NULL REFERENCES workflow.alert(alert_id), acknowledged_by VARCHAR(200) NOT NULL, acknowledgement_text TEXT, idempotency_key VARCHAR(200) NOT NULL UNIQUE, acknowledged_at TIMESTAMPTZ NOT NULL DEFAULT now() );

CREATE TABLE IF NOT EXISTS workflow.investigation_case ( case_id UUID PRIMARY KEY, alert_id UUID REFERENCES workflow.alert(alert_id), owner_subject VARCHAR(200) NOT NULL, case_status VARCHAR(50) NOT NULL, severity VARCHAR(50) NOT NULL, summary TEXT, opened_at TIMESTAMPTZ NOT NULL DEFAULT now(), closed_at TIMESTAMPTZ );

Add indexes for the application query pattern.

CREATE INDEX IF NOT EXISTS idx_alert_status_created ON workflow.alert(status, created_at DESC);

CREATE INDEX IF NOT EXISTS idx_alert_instrument_venue ON workflow.alert(instrument_id, venue, created_at DESC);

CREATE INDEX IF NOT EXISTS idx_case_owner_status ON workflow.investigation_case(owner_subject, case_status);

Create separate PostgreSQL roles for application read-write access, operations review, and read-only support. Grant only required schema and table privileges. Application authorization must still validate the end-user action. A database credential alone does not establish business permission.

Stage Ten: Connect Lakebase and the Lakehouse

Delta change history ➔ Analytical evidence ➔ Narrow synchronization ➔ Declared direction ➔ One write authority

Use the supported Lakebase integration to store PostgreSQL changes as Delta history for downstream audit and analysis. Configure the workflow tables required for evidence, beginning with alerts, acknowledgements, and cases.

The analytical copy must preserve database transaction identity, commit time, source table, operation type, and record version. Acknowledgements should become analytical evidence without allowing the analytical copy to become the write authority.

Where the application needs low-latency local reads of certified lakehouse assets, use the supported synchronization of Unity Catalog tables into Lakebase. Synchronize only narrow, approved tables such as current venue health or instrument reference. Document the synchronization direction, expected lag, conflict owner, and recovery procedure.

Do not design a bidirectional loop in which the same field can be authoritatively updated in both Lakebase and Delta. Every field requires one system of write authority.

Stage Eleven: Build the Databricks App

Control tower app ➔ Certified metrics ➔ Lakebase workflow ➔ Server-side authorization ➔ Read-only failure

Create a Databricks App named asia_liquidity_control_tower. Add Lakebase as the transactional resource and the approved SQL warehouse as the analytical resource. Use a dedicated app service principal.

The app opens with a regional market-control page. It shows Hong Kong, Singapore, Tokyo, Seoul, and ASEAN venue states. Each venue displays freshness, sequence quality, spread, imbalance, executable depth, and decision state.

The instrument page shows normalized top-of-book values, local-currency values, cross-venue divergence, funding age, risk headroom, and source evidence. The workflow page shows open alerts, acknowledgement state, investigation owner, severity, and case status.

The app must query analytical metrics from the certified application-facing view. It must use Lakebase only for mutable workflow state. It must not calculate a second independent definition of spread, quality, or limit headroom in application code.

A representative application flow is shown below.

# Pseudocode showing separation of analytical reads and transactional writes.

def load_market_state(sql_client, instrument_id):
    return sql_client.query(
        """
        SELECT *
        FROM asia_ltap_demo.app_serving.market_control_view
        WHERE instrument_id = :instrument_id
        """,
        {"instrument_id": instrument_id},
    )


def acknowledge_alert(pg_connection, alert_id, user_subject, text, idempotency_key):
    with pg_connection.transaction():
        pg_connection.execute(
            """
            INSERT INTO workflow.alert_acknowledgement
              (acknowledgement_id, alert_id, acknowledged_by,
               acknowledgement_text, idempotency_key)
            VALUES (gen_random_uuid(), %s, %s, %s, %s)
            ON CONFLICT (idempotency_key) DO NOTHING
            """,
            (alert_id, user_subject, text, idempotency_key),
        )

Generated or hand-written app code must enforce server-side authorization. Store no password or token in source code. Use connection pooling, timeouts, retries only for safe idempotent operations, and explicit read-only behavior when Lakebase is unavailable.

Stage Twelve: Build the AI/BI Dashboard

Executive view ➔ Trader view ➔ Control view ➔ Operations evidence ➔ Certified definitions

Create a dashboard named Asia Real-Time Liquidity Control. Use certified views rather than local duplicate calculations.

The executive page shows valid venues, degraded venues, total visible depth, average spread, remaining risk headroom, deployable funding, and open operational exceptions.

The trader page shows venue top-of-book, normalized price comparison, spread basis points, order-book imbalance, executable depth, and cross-venue divergence.

The control page shows sequence gaps, market-data age, funding age, limits, quality state, and evidence readiness. A venue with invalid sequence state must remain visible but visually blocked from current cross-venue conclusions.

The operations page shows Lakebase alert and acknowledgement analytics after those changes are stored into Delta. It should not query the production transactional endpoint for large historical analysis.

Publish the dashboard to the approved groups. Test as a consumer, trader, operations user, and risk reviewer.

Stage Thirteen: Run the Healthy-State Demo

Valid venues ➔ Watchlist and alert ➔ Durable acknowledgement ➔ Unity Catalog lineage ➔ Separate writes

Open the dashboard and show all five venues in VALID state. Open the application and select ASIA_EQ_001. Explain that prices are normalized to USD while local prices remain preserved.

Create a watchlist entry in Lakebase. Generate an alert from the synthetic analytical state. Acknowledge the alert in the app. Verify the acknowledgement in Lakebase and later in the analytical Delta history.

Open Unity Catalog lineage. Trace one application metric from the raw event through normalization and the venue feature view to the application-facing view and dashboard.

The audience should see that analytical evidence and operational workflow share the platform but retain separate write responsibilities.

Stage Fourteen: Inject a Sequence Gap

Skipped sequence ➔ Degraded venue ➔ Blocked cross-venue use ➔ Explicit stale values ➔ Acknowledgement without repair

Insert a Hong Kong record that skips sequence 102 and advances to 103.

INSERT INTO asia_ltap_demo.raw.order_book_event VALUES ('HK-103', 'ASIA_EQ_001', 'HKX', 103, current_timestamp(), current_timestamp(), 'BID', 779.50, 4200, 1, 'UPSERT', 'LIVE');

Refresh the sequence-health and serving queries. Hong Kong should change to DEGRADED_SEQUENCE_GAP. The market-control view should change its decision state to BLOCKED_MARKET_DATA_QUALITY for Hong Kong. The cross-venue state should exclude Hong Kong from the valid venue set.

The application should continue to display the last valid Hong Kong values only with an explicit degraded label, source time, and prohibition against using the venue as a trusted current leg. The dashboard should report the quality incident rather than hide the venue.

Create an alert in Lakebase for the gap. The alert records the source event and the quality state. A trader can acknowledge awareness, but acknowledgement does not change the analytical quality state.

Stage Fifteen: Recover the Book

Documented recovery ➔ Restored completeness ➔ Recovery evidence ➔ Valid only after rule ➔ Preserved degraded interval

In a real venue integration, recover through the venue or vendor's documented snapshot and sequence-reset protocol. For the demo, delete the synthetic invalid event and insert a complete replacement sequence in a new demonstration version, or reset the synthetic source table from a known snapshot.

Do not simply relabel the quality state as valid. Recovery requires evidence that book completeness has been restored. Record the recovery event, snapshot identifier, operator or service identity, and recovery time.

After recovery, rerun the quality view. Hong Kong returns to VALID only when the rule is satisfied. The evidence history must retain the degraded interval.

Stage Sixteen: Simulate Lakebase Failure

Unavailable endpoint ➔ Readable analytics ➔ Refused acknowledgements ➔ No silent replay ➔ Recorded outage

Temporarily make the app's Lakebase endpoint unavailable in the non-production environment or revoke the demo app's connection for the test window. Do not test destructive failure against a shared environment.

The app should remain able to read certified market metrics through the analytical warehouse. It must switch workflow controls to read-only mode. A user attempting to acknowledge an alert receives a clear message that the action cannot be committed and has not been recorded.

The application must not store the acknowledgement only in browser memory and replay it later without renewed user intent. When Lakebase recovers, the user can resubmit through an idempotent request.

Record the outage start, detection time, read-only transition, attempted writes, recovery time, and successful post-recovery transaction.

Stage Seventeen: Simulate Model Failure

Disabled model endpoint ➔ Deterministic metrics ➔ Unavailable prediction ➔ No stale reuse ➔ Evidence-owned decision

If the demo includes a model endpoint for expected impact, disable or deny the endpoint temporarily. Deterministic metrics such as spread, depth, imbalance, quality, funding age, and limit headroom remain available.

The impact estimate changes to MODEL_UNAVAILABLE. The app must not reuse an old prediction without displaying its age and invalid status. The final decision state remains governed by current deterministic evidence.

This test demonstrates that AI is an optional analytical dependency, not the owner of market-data truth.

Stage Eighteen: Test Permissions and Entitlements

Role-based access ➔ Explicit denials ➔ Restricted raw events ➔ Market-data rights ➔ Passed control

Test the system with multiple identities. A consumer can view certified regional aggregates but cannot query raw order-book events. A trader can view instrument-level features and create personal watchlists. Operations can acknowledge and investigate alerts. Risk can view limits and evidence. App builders can deploy to non-production but cannot change production data ownership.

Test denial explicitly. Attempt to query the raw schema as a consumer. Attempt to update a Lakebase workflow table as a read-only support role. Attempt to display a restricted venue for a group without market-data permission. A denied request is a passed control.

Market-data rights must follow the data into dashboards, apps, exports, agents, and other regions. The demo tags are illustrative; production enforcement must reflect actual contracts.

Stage Nineteen: Test Performance and Recovery

Throughput and latency ➔ Lakebase transactions ➔ Query percentiles ➔ Recovery behavior ➔ Tail under stress

Replay synthetic events at increasing rates. Measure event throughput, source-to-ingestion latency, ingestion-to-feature latency, serving latency, rendering latency, state-store size, checkpoint duration, and replay time.

Measure Lakebase transaction latency, connection pressure, lock waits, autoscaling behavior, failover behavior where HA is enabled, and error rate. Test idempotent acknowledgement under duplicate requests.

Measure analytical query p50, p95, and p99 under concurrent users. Test the selective Lakehouse Real-Time query separately from broad analytical queries. The test report must identify warehouse type, size, autoscaling, data volume, query text, concurrency, warm or cold state, and observation period.

A median latency without tail latency, recovery, and quality behavior is not a production result.

Stage Twenty: Production Hardening

Contract-tested sources ➔ Infrastructure as code ➔ Function service objectives ➔ Separate recovery ➔ Read-only first release

Replace synthetic tables with contract-tested sources. Add data-quality expectations, quarantine, alerting, dead-letter handling, snapshot recovery, schema evolution, and source ownership.

Use infrastructure as code for workspace, identity, network, compute, pipeline, Lakebase, application, and permissions where supported. Store code and database migrations in version control. Use development branches and controlled promotion.

Define service objectives for ingestion, feature freshness, application read, Lakebase write, acknowledgement durability, dashboard query, recovery, and evidence reconstruction. Set RPO and RTO by function rather than platform slogan.

Enable Lakebase high availability only after failover testing. Keep cross-region Lakebase disaster recovery outside the production dependency chain while it remains Private Preview and not intended for production. Build and test an approved regional recovery design for the lakehouse, application, configuration, secrets, and operational procedures.

Keep the first production release read-only with respect to market orders, allocations, limits, and funds. An alert acknowledgement is not approval to trade. Any future action integration requires a segregated identity, allowlisted tool, transaction limit, explicit preconditions, dual approval where required, immutable logging, reconciliation, timeout, compensation strategy, and kill switch.

Live Demonstration Script

Healthy surfaces ➔ Sequence gap ➔ Book recovery ➔ Lakebase and model failure ➔ Reconstructible evidence

Begin with the architecture view and explain the four planes. Show Unity Catalog and the certified analytical assets. Open Lakebase and show the workflow tables. Open the healthy dashboard and application.

Create and acknowledge one alert. Show the PostgreSQL commit and the analytical evidence path. Return to the market view and inject the Hong Kong sequence gap. Show the quality state change and the blocked cross-venue conclusion.

Recover the synthetic book through the documented demo reset. Show the restored state and preserved incident history. Simulate Lakebase failure and show application read-only behavior. Restore Lakebase and submit a new idempotent acknowledgement. Disable the model endpoint and show deterministic analytics continuing without a fabricated prediction.

Conclude in Unity Catalog lineage and the evidence dashboard. Demonstrate that the system can reconstruct what happened, when it happened, which component failed, which user acted, and what the platform allowed at each moment.

Demo Acceptance Criteria

Shared definitions ➔ Blocked gaps ➔ Honest outages ➔ Preserved evidence ➔ Synchronized truth

The demo is accepted only when raw, trusted, feature, and application-serving assets have clear ownership and permissions; the same liquidity definitions appear in SQL, dashboard, and application; an unresolved sequence gap blocks dependent analysis; alert acknowledgement never changes market-data quality; Lakebase failure prevents transactional writes without hiding analytical state; model failure does not remove deterministic metrics; evidence preserves the degraded interval and recovery; consumer access cannot expose raw restricted data; and every failure produces a clear, truthful operating state.

The decisive result is not low latency alone. It is synchronized truth across specialized engines with explicit control boundaries.

References

Unity Catalog ➔ Metric views ➔ Genie platform ➔ App Builder ➔ Agent governance ➔ Current validation

Databricks. “Lakebase Postgres.” Databricks Documentation, last updated October 9, 2026. https://docs.databricks.com/aws/en/oltp/projects/

Databricks. “LTAP Architecture.” Databricks Documentation, last updated October 6, 2026. https://docs.databricks.com/aws/en/oltp/projects/ltap-overview

Databricks. “Autoscaling.” Databricks Documentation, last updated September 17, 2026. https://docs.databricks.com/aws/en/oltp/projects/autoscaling

Databricks. “High Availability.” Databricks Documentation, last updated October 9, 2026. https://docs.databricks.com/aws/en/oltp/projects/high-availability

Databricks. “Lakebase Disaster Recovery.” Databricks Documentation, last updated October 9, 2026. https://docs.databricks.com/aws/en/oltp/projects/disaster-recovery

Databricks. “Lakehouse Real-Time.” Databricks Documentation, last updated October 9, 2026. https://docs.databricks.com/aws/en/compute/sql-warehouse/real-time

Databricks. “Real-Time Mode Concepts.” Databricks Documentation, last updated October 13, 2026. https://docs.databricks.com/aws/en/structured-streaming/real-time/concepts

Databricks. “Set Up Real-Time Mode.” Databricks Documentation, last updated September 11, 2026. https://docs.databricks.com/aws/en/structured-streaming/real-time/setup

Databricks. “Real-Time Mode Reference.” Databricks Documentation, last updated September 11, 2026. https://docs.databricks.com/aws/en/structured-streaming/real-time/reference

Source architecture. “One Governed Data Plane for Asia's Real-Time Markets: An LTAP Architecture with Databricks Lakebase and Lakehouse.” Attached enterprise paper. citeturn14search108

Reference note. Lakehouse Real-Time was Beta as of October 9, 2026. Feature support, guardrails, performance, regions, interfaces, and pricing can change before general availability.

Reference note. Lakebase cross-region disaster recovery was Private Preview as of October 9, 2026 and was not intended for production use during the preview. High availability and disaster recovery protect different failure domains.

Reference note. The real-time mode code in this article is a representative demo pattern. Validate APIs, runtime, sources, sinks, output modes, operators, compute requirements, and limitations against the current cloud documentation before execution.