Bundled DataHub context RI
contextIsKey · STATELESS INCIDENT INVESTIGATION

Triage Composer

Translate an SRS or incident brief into bounded DataHub-shaped mappings and reviewable SQL. Submitted text is processed for this response, not saved, and SQL is never executed.

LOCAL TEXT ONLY
01

Describe the investigation

Paste requirements or load a local text file into this browser form. The server receives only submitted fields.

The file stays ephemeral; only extracted text is processed and nothing is saved.
Extracted rule mappings—not the original file—are sent to OpenAI. Advisory output cannot change deterministic evidence.
Mapping warningsUnmapped rules are retained for human follow-up; they cannot create a query or export control.

!Rule 9 is UNMAPPED; no bounded DataHub asset was selected.

89%context coverage
COMPUTED COVERAGE

8 mapped rules

9 extracted rules were evaluated against the bounded catalog.

CROSS-DOMAIN QUERY FLOW
CommerceFinancePaymentsReturns & RefundsFulfillmentCustomer IdentityRegional Policy

Domains are shown in the order first selected by the computed mappings.

02

Extracted rule mappings

Each rule is mapped to one bounded dataset, its fields, owner, and business term.

DETERMINISTIC
RuleDataHub contextEvidence selected
01MAPPED

Commerce orders record the customer, order total, and ordered-at timestamp.

commerce.ordersCommerce · Commerce Dataorder_id, customer_id, ordered_at, order_totalOrder lifecycle
02MAPPED

Invoices create the accounts-receivable amount that must be posted to finance.

finance.ar_transactionsFinance · Accounts Receivabletransaction_id, invoice_id, order_id, customer_id, amount, posted_atAR transaction
03MAPPED

Payments and settlement records reduce the invoice balance when funds settle.

payments.settlementsPayments · Payments Platformsettlement_id, invoice_id, settled_amount, settled_at, statusSettlement
04MAPPED

Returns and refunds reduce the balance when merchandise is returned.

commerce.returns_refundsReturns & Refunds · Customer Carereturn_id, order_id, refund_amount, returned_at, reasonRefund
05MAPPED

Fulfillment shipments provide delivery timestamps for the chronological event trail.

fulfillment.shipmentsFulfillment · Fulfillment Operationsshipment_id, order_id, shipped_at, delivered_at, statusShipment
06MAPPED

Customer identity links customer IDs to accounts and regional scope.

identity.customersCustomer Identity · Identity Platformcustomer_id, account_id, customer_region, statusCustomer
07MAPPED

Regional policy determines tax and credit-day rules for reconciliation.

policy.regional_ar_rulesRegional Policy · Regional Policyregion_code, effective_from, effective_to, tax_rate, credit_daysRegional AR policy
08MAPPED

The incident investigation must compare all events by customer and event timestamp.

identity.customersCustomer Identity · Identity Platformcustomer_id, account_id, customer_region, statusCustomer
09UNMAPPED

The final reconciliation should flag negative running balances and missing joins.

Human mapping neededNo bounded catalog keyword matched this rule.No generated query evidence
04

Context graph coverage

Exactly which DataHub context types shaped this investigation—and which require a live DataHub connection.

HONEST SCOPE
7datasets selected
34schema fields
7owners
7domains
7glossary terms
7bounded lookups
HOSTED DEMO

Bundled DataHub-shaped context

Repeated bounded catalog lookups select datasets, columns, owners, domains, and business terms that directly constrain the generated SQL.

LIVE DATAHUB PATH

MCP + lineage

The included DataHub MCP adapter reads live schemas and lineage. The hosted demo uses bundled synthetic context so it stays fast and Docker-free.

CONNECT TO ACTIVATE

Continuous enterprise context

Quality, freshness, documentation, dashboards, ML models, real-time metadata events, audit access, and governance remain clearly labeled until supplied by live DataHub.

05

How DataHub context helped—step by step

Every bundled lookup names the asset and exact metadata that changed the query. Live mode replaces these fixtures with MCP schema and lineage reads.

Bundled synthetic DataHub-shaped metadata; generated SQL requires review.
  1. 01
    Bundled context lookup #1 · commerce.orders

    Bundled catalog discovery selected the dataset; schema-shaped context selected order_id, customer_id, ordered_at, order_total; the context graph linked domain Commerce, owner Commerce Data, and glossary term Order lifecycle.

  2. 02
    Bundled context lookup #2 · finance.ar_transactions

    Bundled catalog discovery selected the dataset; schema-shaped context selected transaction_id, invoice_id, order_id, customer_id, amount, posted_at; the context graph linked domain Finance, owner Accounts Receivable, and glossary term AR transaction.

  3. 03
    Bundled context lookup #3 · payments.settlements

    Bundled catalog discovery selected the dataset; schema-shaped context selected settlement_id, invoice_id, settled_amount, settled_at, status; the context graph linked domain Payments, owner Payments Platform, and glossary term Settlement.

  4. 04
    Bundled context lookup #4 · commerce.returns_refunds

    Bundled catalog discovery selected the dataset; schema-shaped context selected return_id, order_id, refund_amount, returned_at, reason; the context graph linked domain Returns & Refunds, owner Customer Care, and glossary term Refund.

  5. 05
    Bundled context lookup #5 · fulfillment.shipments

    Bundled catalog discovery selected the dataset; schema-shaped context selected shipment_id, order_id, shipped_at, delivered_at, status; the context graph linked domain Fulfillment, owner Fulfillment Operations, and glossary term Shipment.

  6. 06
    Bundled context lookup #6 · identity.customers

    Bundled catalog discovery selected the dataset; schema-shaped context selected customer_id, account_id, customer_region, status; the context graph linked domain Customer Identity, owner Identity Platform, and glossary term Customer.

  7. 07
    Bundled context lookup #7 · policy.regional_ar_rules

    Bundled catalog discovery selected the dataset; schema-shaped context selected region_code, effective_from, effective_to, tax_rate, credit_days; the context graph linked domain Regional Policy, owner Regional Policy, and glossary term Regional AR policy.

06

Reviewable investigation SQL

Generated from extracted mappings; it is a draft and was not executed.

HUMAN REVIEW
/* Generated by contextIsKey · DataHub context layer; review required; not executed.
Incident question: Why is AsterVale Living's accounts-receivable balance different from the customer-facing order and settlement records?
*/
WITH customer_scope AS (
    -- Mapped DataHub context: identity customers with regional policy.
    SELECT c.customer_id, c.account_id, c.customer_region, p.credit_days,
           CASE WHEN p.region_code IS NULL THEN 1 ELSE 0 END AS policy_join_missing
    FROM identity.customers AS c
    LEFT JOIN policy.regional_ar_rules AS p ON p.region_code = c.customer_region
), order_events AS (
    SELECT o.order_id AS event_id, o.order_id, o.customer_id, o.ordered_at AS event_at,
           o.order_total AS amount, 0 AS source_join_missing
    FROM commerce.orders AS o
), invoice_events AS (
    SELECT a.invoice_id AS event_id, a.order_id, a.customer_id, a.posted_at AS event_at,
           a.amount, 0 AS source_join_missing
    FROM finance.ar_transactions AS a
), order_comparison AS (
    SELECT o.order_id, o.customer_id, o.event_at AS ordered_at, o.amount AS order_total,
           a.amount AS invoice_amount
    FROM order_events AS o
    LEFT JOIN invoice_events AS a ON a.order_id = o.order_id
), payment_events AS (
    SELECT s.settlement_id AS event_id, a.customer_id, s.settled_at AS event_at,
           -s.settled_amount AS amount,
           CASE WHEN a.invoice_id IS NULL THEN 1 ELSE 0 END AS source_join_missing
    FROM payments.settlements AS s
    LEFT JOIN finance.ar_transactions AS a ON a.invoice_id = s.invoice_id
), return_refund_events AS (
    SELECT r.return_id AS event_id, o.customer_id, r.returned_at AS event_at,
           -r.refund_amount AS amount,
           CASE WHEN o.order_id IS NULL THEN 1 ELSE 0 END AS source_join_missing
    FROM commerce.returns_refunds AS r
    LEFT JOIN commerce.orders AS o ON o.order_id = r.order_id
), fulfillment_events AS (
    SELECT s.shipment_id AS event_id, o.customer_id, s.delivered_at AS event_at,
           CAST(0 AS decimal(18, 2)) AS amount,
           CASE WHEN o.order_id IS NULL THEN 1 ELSE 0 END AS source_join_missing
    FROM fulfillment.shipments AS s
    LEFT JOIN commerce.orders AS o ON o.order_id = s.order_id
), normalized_events AS (
    SELECT event_id, customer_id, event_at, amount, 'ORDER' AS event_type, 0 AS affects_ar,
           source_join_missing
    FROM order_events
    UNION ALL
    SELECT event_id, customer_id, event_at, amount, 'INVOICE' AS event_type, 1 AS affects_ar,
           source_join_missing
    FROM invoice_events
    UNION ALL
    SELECT event_id, customer_id, event_at, amount, 'PAYMENT' AS event_type, 1 AS affects_ar,
           source_join_missing
    FROM payment_events
    UNION ALL
    SELECT event_id, customer_id, event_at, amount, 'REFUND' AS event_type, 1 AS affects_ar,
           source_join_missing
    FROM return_refund_events
    UNION ALL
    SELECT event_id, customer_id, event_at, amount, 'FULFILLMENT' AS event_type, 0 AS affects_ar,
           source_join_missing
    FROM fulfillment_events
), running_balance AS (
    SELECT event_id, customer_id, event_at, amount, event_type, affects_ar,
           source_join_missing,
           SUM(CASE WHEN affects_ar = 1 THEN amount ELSE CAST(0 AS decimal(18, 2)) END)
               OVER (PARTITION BY customer_id,
                                    CASE WHEN customer_id IS NULL THEN event_id END
                     ORDER BY event_at, event_id
                     ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_balance
    FROM normalized_events
), order_invoice_mismatches AS (
    SELECT order_id, customer_id
    FROM order_comparison
    WHERE invoice_amount IS NULL OR order_total <> invoice_amount
), final_results AS (
    SELECT r.event_id, r.customer_id, r.event_at, r.amount, r.event_type, r.affects_ar,
           r.running_balance, c.account_id, c.customer_region, c.credit_days,
           CASE
               WHEN r.source_join_missing = 1 OR c.customer_id IS NULL
                    OR c.policy_join_missing = 1 THEN 'MISSING_JOIN'
               WHEN m.order_id IS NOT NULL THEN 'ORDER_INVOICE_MISMATCH'
               WHEN r.affects_ar = 1 AND (r.running_balance < 0 OR r.amount IS NULL)
                   THEN 'AR_BALANCE_EXCEPTION'
               ELSE NULL
           END AS issue_label
    FROM running_balance AS r
    LEFT JOIN order_invoice_mismatches AS m
        ON m.customer_id = r.customer_id AND m.order_id = r.event_id
    LEFT JOIN customer_scope AS c ON c.customer_id = r.customer_id
)
SELECT f.*
FROM final_results AS f
ORDER BY f.customer_id, f.event_at, f.event_id;