GoWindGoWind
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
  • Introduction

    • GoWind UBA Product Introduction
  • Architecture Reference

    • UBA System Architecture
    • UBA Backend Module Overview
    • UBA Backend API Contract
    • UBA Frontend Architecture
  • Developer Guide

    • UBA Installation Guide
    • UBA Code Generation Pipeline Tutorial
    • Adding an External Service Tutorial
    • Adding a Business Entity Tutorial
    • Adding a Frontend Page Tutorial
  • Operations Guide

    • UBA Docker Deployment Guide
    • UBA Configuration Reference & Security Checklist
    • UBA PM2 Deployment Guide
    • UBA Superset BI Deployment Guide
  • Analyst Guide

    • Data Analyst Getting Started Guide
    • Basic Aggregation

      • Event Trend Analysis
      • Active Users Analysis
      • Group By Aggregation
    • Conversion & Paths

      • Funnel Analysis
      • Retention Analysis
      • Top Conversion Paths
      • Behavior Sequence Analysis
    • User Depth

      • Attribution Analysis
      • Distribution Analysis
      • User Segmentation
      • Click Heatmap
      • Interval Analysis
    • Lifecycle

      • User Lifecycle
      • Churn & Reactivation Analysis
      • New vs Returning Users
      • Matrix Quadrant Analysis
    • Revenue & Value

      • Revenue Analysis
      • Whale Tier (Payer Segmentation)
      • Historical LTV Analysis
    • Sessions & Anomalies

      • Session Analysis
      • Period-over-Period Comparison and Anomaly Detection
    • Gaming

      • Level Analysis (Game)
      • Server Retention (Game)
      • Online Stats Analysis (Game)
      • Economy Analysis (Game)
    • OLAP Cookbook
  • SDK Integration

    • Web SDK Integration Guide
    • C# SDK Integration Guide (Unity / Godot / .NET)
  • Appendix

    • UBA Appendix: Ports, Glossary, Known Limitations & FAQ

UBA Superset BI Deployment Guide

This document is aimed at operations engineers and data analysts, describing how to deploy Apache Superset and connect it to GoWind UBA's OLAP engine (Doris by default), building visual dashboards on the fact tables.

Read System Architecture first. UBA and Superset are loosely coupled: Superset runs as an independent BI container, connecting directly to the Doris FE via the MySQL protocol to query the fact tables of the gw_uba database.


1. Deployment Architecture

  • UBA writes analytics data into Doris's gw_uba database (events_fact / sessions_fact / risk_events / users_dim etc.).
  • Superset connects to Doris FE's port 9030 via the pydoris (or pymysql) driver, modeling these tables as Datasets.

2. One-Click Docker Deployment

Superset is preconfigured in docker-compose.yaml (apache/superset:latest, port 8088). The container automatically completes initialization at startup:

  1. Switches the apt sources to Aliyun mirrors and installs build dependencies (gcc python3-dev default-libmysqlclient-dev pkg-config).
  2. Enters Superset's real venv /app/.venv and installs pymysql and pydoris (the Doris driver).
  3. Runs superset db upgrade → superset fab create-admin (admin/admin) → superset init.
  4. Starts run-server.sh.
cd backend
./scripts/docker/full_deploy.sh   # full-stack deployment (includes superset)
# or dependencies only: ./scripts/docker/libs_only.sh (the libs compose also includes superset)

Visit: http://localhost:8088/login/, default account admin / admin.

⚠️ For production, make sure to: change the admin password, replace SUPERSET_SECRET_KEY, and restrict access origins.


3. Connecting to UBA's Doris

In the Superset UI → Settings → Database Connectors → add Apache Doris, fill in the connection string (pointing to the Doris FE query port 9030, database gw_uba):

DriverConnection string
Doris (pydoris, recommended)pydoris://root:@host.docker.internal:9030/internal.gw_uba
MySQL (pymysql)mysql+pymysql://root:@host.docker.internal:9030/gw_uba

Key points:

  • Superset runs inside a container; use host.docker.internal to reach Doris on the host (or doris-fe:9030 within the same compose network).
  • The database name is uniformly gw_uba (consistent with UBA Core's data.yaml doris.database).
  • Enable options such as "Allow SQL Lab data upload" as needed when connecting.

Source reference: backend/docs/deploy_superset.md.


4. Creating Datasets & Dashboards

1. Add Datasets

In Superset → Data → Datasets, add UBA's fact/dimension tables as datasets:

TableTypeUse
events_factFact tableEvent details; trends/funnels/group analysis
sessions_factFact tableSession analysis, bounce rate
risk_eventsFact tableRisk event monitoring
users_dimDimension tableUser profile distributions
objects_dimDimension tableBehavior object analysis
id_mappingMapping tableCross-platform ID association
user_tagsAssociation tableUser tag distributions

2. Configure Field Metadata

For each Dataset, annotate field types, whether it is a time dimension (e.g. event_time / event_date), and whether it is aggregatable on the Columns page, so charts recognize them correctly.

3. Build Charts & Dashboards

Build charts on the Datasets (line trends, funnel steps, retention heatmaps, etc.) and combine them into dashboards. Typical dashboards:

  • Operations overview: DAU/MAU trends, channel distribution (channel), platform distribution (platform).
  • Conversion funnel: based on event_name sequences from events_fact.
  • Risk monitoring: risk type/level distributions and trends from risk_events.
  • User profiles: region/level/VIP distributions from users_dim.

The UBA admin console ships with 25 analysis models built in (covering general Web/APP and game scenarios; see the Product Introduction for details); Superset is for more flexible custom BI and reports. The two complement each other.


5. Direct Queries in SQL Lab

You can query directly without creating Datasets. In Superset → SQL Lab → SQL Editor, pick the Doris connection and write SQL directly:

-- DAU per channel over the last 7 days
SELECT channel, event_date, count(DISTINCT user_id) AS dau
FROM gw_uba.events_fact
WHERE event_date >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
GROUP BY channel, event_date
ORDER BY event_date, dau DESC;

For the dual-engine SQL dialect differences (Doris DATE_FORMAT vs ClickHouse toStartOfHour), see the OLAP Query Cookbook.


6. Common Issues

SymptomTroubleshooting direction
Cannot connect to DorisUse doris-fe:9030 inside containers or host.docker.internal:9030 on the host; confirm FE is ready (http://localhost:8030)
Missing driverpydoris should already be installed by the container's init script; to install manually: enter the container and run /app/.venv/bin/pip install pydoris pymysql
Queries return no dataConfirm the OLAP engine's Kafka consumption job is working (whether events_fact has data) — see System Architecture · Kafka Consumption Mechanism; you can load test data first
Dashboards load slowlyCheck Doris partitions/indexes; add time filters for large tables; adjust the Superset cache (CACHE_DEFAULT_TIMEOUT)

7. Related Documentation

  • System Architecture
  • Docker Deployment
  • Configuration Reference
  • OLAP Query Cookbook
  • Data Analyst Getting Started
Edit this page
Last Updated:: 11/3/26, 2:14 PM
Contributors: Bobo
Prev
UBA PM2 Deployment Guide