Skip to content

Data Pane Demo Script ​

Five demos. About twelve minutes. Governed enterprise data inside GhostAI through the Dymium platform.

This script walks through GhostAI’s Data Pane integration with Dymium: administrators bind the org to a Dymium tenant (platform_url, OAuth client_id, and client_secret), each analyst completes per-user OAuth, then the product lists governed data sources, runs natural-language or raw SQL queries with row limits and column-level policy, and requests AI-generated insights across connected systems.

Implementation reference: securechat/backend/app/routers/data.py and securechat/backend/app/services/dymium_data_service.py. All Data Pane REST routes are prefixed with /api/data.


Pre-Demo Checklist ​

  • [ ] Dymium platform is provisioned for the customer’s environment (reachable HTTPS, OAuth client registered for GhostAI’s callback)
  • [ ] Org-level connection is configured in GhostAI: dymium_platform_url, dymium_client_id, and dymium_client_secret (secret is admin-only; stored in organization settings or supplied via DYMIUM_PLATFORM_URL, DYMIUM_CLIENT_ID, DYMIUM_CLIENT_SECRET environment variables on the backend)
  • [ ] OAuth redirect URI registered in Dymium matches GhostAI’s backend: {base_url}/api/data/connection/callback (from get_settings().base_url)
  • [ ] Demo user can sign in to GhostAI with organization context (multi-tenant org membership)
  • [ ] Admin demo account available for showing Settings → Data Sources (or PUT /api/data/connection/config) without exposing the client secret on screen after save
  • [ ] At least one connected data source in Dymium (PostgreSQL, MySQL, Snowflake, BigQuery, or other supported source_type) with a governance policy attached so policy_name and governed: true columns are visible in the schema browser
  • [ ] GhostAI backend running and reachable; optional: API client or browser dev tools to show raw JSON for GET /api/data/connection/status and POST /api/data/query

Quick API smoke test (optional) ​

bash
curl -s -H "Authorization: Bearer $GHOSTAI_API_KEY" \
  "$GHOSTAI_BASE_URL/api/data/connection/status" | python3 -m json.tool

Expect status: not_configured, disconnected, healthy, or error. not_configured means missing platform URL/client ID for the org (or no org context on the key).


The Story ​

Jordan leads a data platform team. Analysts live in GhostAI for AI workflows, but regulated columns must never leak. Dymium is the governance plane: policies decide who sees what, governed fields are masked or tokenized at query time, and GhostAI’s Data Pane is the controlled window—same questions, safer answers.


Demo 1: Connection Setup ​

Duration: 2 minutes
Story: Show how the organization is wired to Dymium, how each user authorizes, and how operators read connection health.

What to show ​

  1. Admin configuration (org-level)
    In product copy, emphasize three persisted fields (organization settings):

    • dymium_platform_url — Dymium API base (shown in API as platform_url)
    • dymium_client_id — OAuth client identifier (shown as client_id)
    • dymium_client_secret — confidential credential; never returned by GET /api/data/connection/config; only writable via PUT /api/data/connection/config (admin) or environment
  2. Read non-secret config — GET /api/data/connection/config
    Response model DymiumConnectionConfigResponse: platform_url, client_id, configured (true when both URL and client ID are set).

  3. OAuth initiation — POST /api/data/connection/auth
    Returns auth_url and state. User completes login/consent in the browser; Dymium redirects to /api/data/connection/callback with code and state.

  4. OAuth completion — POST /api/data/connection/callback with JSON {"code": "...", "state": "..."}
    Success body: {"success": true, "message": "Connected to Dymium platform."} — GhostAI exchanges the code and caches OAuth tokens per user.

  5. Status — GET /api/data/connection/status
    ConnectionStatus: status is one of:

    • not_configured — missing org Dymium URL/client ID (or no organization context)
    • disconnected — configured but user has not completed OAuth or tokens invalid
    • healthy — platform reachable and user session valid
    • error — misconfiguration or platform error (use message for detail)
      Also surface platform_url, platform_version when available.

Talking points ​

"Secrets stay on the admin path. Everyone else sees connected vs not and healthy vs error—we do not echo client_secret back over the API."

"OAuth is per user. That lets Dymium enforce who is asking, not just which app is asking."


Demo 2: Browse Data Sources ​

Duration: 2 minutes
Story: Prove analysts only see sources and columns their policies allow—before they run a single query.

What to show ​

  1. List sources — GET /api/data/sources
    Array of DataSourceInfo: id, name, source_type (for example PostgreSQL, MySQL, Snowflake), database, description, policy_name, tables (may be empty in list view; full tables come from schema endpoint).

  2. Schema for one source — GET /api/data/sources/{source_id}/schema
    Full DataSourceInfo including tables: each TableInfo has name, schema_name, row_count, description, and columns.

  3. Columns and governance — each ColumnInfo: name, data_type, nullable, description, and governed (boolean). Call out columns with governed: true as subject to policy-based masking or redaction when data is returned.

Talking points ​

"The schema browser is already policy-aware. If a column is governed, assume Dymium will enforce that label when we fetch rows—not just when we paste SQL."

"policy_name ties the source back to the customer’s Dymium policy pack—great anchor for security reviewers."


Demo 3: Natural Language Query ​

Duration: 3 minutes
Story: Ask a business question in plain English; show translated SQL, capped rows, and protected values on sensitive columns.

What to show ​

  1. Request — POST /api/data/query with JSON like:
json
{
  "source_id": "src_postgres_analytics",
  "query": "Show top 10 customers by revenue last quarter",
  "natural_language": true,
  "max_rows": 100
}
  • natural_language defaults to true if omitted.
  • max_rows limits how many rows Dymium returns (truncation reflected in response when applicable).
  1. Response — DataQueryResponse: columns, rows, row_count, truncated, query_ms, source_id, source_name, or error.

  2. Narrate the safety loop — Dymium translates NL to SQL, executes under the user’s entitlements, applies governance to governed columns (masking, hashing, or nulling per policy), then GhostAI displays results. Contrast a governed field with masked or token-like display versus cleartext for open columns.

Talking points ​

"Analysts stay in language they use in standups; Dymium still owns SQL generation and enforcement."

"max_rows is your guardrail against runaway result sets in the UI and in exports."


Demo 4: Direct SQL Query ​

Duration: 2 minutes
Story: Same source, explicit SQL—prove governance is not bypassed by skipping natural language.

What to show ​

  1. Request — POST /api/data/query with natural_language: false:
json
{
  "source_id": "src_postgres_analytics",
  "query": "SELECT customer_id, email, revenue_usd FROM public.orders LIMIT 50",
  "natural_language": false,
  "max_rows": 50
}
  1. Compare to Demo 3: similar columns order may differ; governed columns (for example email) should still appear redacted or masked in rows even though the user typed SELECT.

  2. Errors and denial — if policy blocks the table or column, expect 403 with detail like "Access denied by Dymium governance policy." (router maps DymiumAccessDenied.)

Talking points ​

"Raw SQL does not mean raw data. Dymium applies the same policy layer—this is not 'SQL mode = trusted insider'."

"Use this demo with CISOs: capability for power users, enforcement for the organization."


Demo 5: AI Insights ​

Duration: 2 minutes
Story: Escalate from tabular answers to narrative analysis driven by the Dymium BI agent.

What to show ​

  1. Request — POST /api/data/insight:
json
{
  "question": "What changed in conversion rate between last month and this month, and which regions drive the shift?",
  "source_id": "src_snowflake_warehouse"
}

Omit source_id to let the agent reason across all sources the user may access (when Dymium supports multi-source insight for that tenant).

  1. Response — InsightResponse: summary (executive line), detail (longer analysis), optional structured data, source_id, query_ms, or error.

  2. Tie back to governance: insights are computed through Dymium with the same authenticated user context as queries.

Talking points ​

"This is /api/data/insight—the BI agent packages trends and explanations, not just grids."

"Because it runs under per-user OAuth, the insight engine cannot see data the user was never allowed to query."


Close ​

Recap the arc: admin binds the org (platform_url, client_id, client_secret), users connect once, sources and schemas reflect policies, NL and SQL both respect governance and row limits, and insights extend the same trust model. Offer a follow-up deep dive on Dymium policy authoring and column tagging if the room wants implementation detail.

SOC 2 Type II Certified | BAA Available | HIPAA-Ready