OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Connect to OceanBase Database by using Superset

    Last Updated:2026-04-09 08:28:54  Updated
    share
    What is on this page
    Prerequisites
    Procedure
    Step 1: Obtain the OceanBase Database connection string
    Step 2: Connect to OceanBase Database from the Superset console
    Step 3: Import data and create a table
    Step 4: Create a dataset in Superset
    What to do next

    folded

    share

    This topic describes how to connect to OceanBase Database by using Superset.

    Prerequisites

    • You have locally configured and started Superset. For more information, see the Quickstart for Superset.
    • You have installed OceanBase Database and created a MySQL tenant.
    • You have prepared a dataset. The sample dataset used in this topic is sourced from Kaggle.

    Procedure

    Step 1: Obtain the OceanBase Database connection string

    Contact the deployment personnel or administrator of OceanBase Database to obtain the connection string. The following is a connection string example:

    obclient -h$host -P$port -u$user_name -p$password -D$database_name
    

    The parameters are described as follows:

    • $host: the IP address for connecting to OceanBase Database. It is the IP address of OceanBase Database Proxy (ODP) for connection through ODP, or the IP address of an OBServer node for direct connection.

    • $port: the port for connecting to OceanBase Database. For connection through ODP, the default value is 2883, which can be customized when ODP is deployed. For direct connection, the default value is 2881, which can be customized when OceanBase Database is deployed.

    • $database_name: the name of the database to be accessed.

      Notice

      The user for connecting to a tenant must have the CREATE, INSERT, DROP, and SELECT privileges on the database. For more information about user privileges, see Privilege types in MySQL mode.

    • $user_name: the tenant account. For connection through ODP, two account formats are supported: username@tenant name#cluster name and cluster name:tenant name:username. For direct connection, the username@tenant name format is supported.

    • $password: the password of the account.

    For more information about the connection string, see Connect to an OceanBase Database tenant by using OBClient.

    Here is an example:

    obclient -hxxx.xxx.xxx.xxx -P2881 -utest_user001@mysql001 -p****** -Dtest
    

    Step 2: Connect to OceanBase Database from the Superset console

    1. In the Superset console, click the plus sign (+) and choose Data > Connect database.

    2. In the dialog box that appears, complete the following settings:

      1. In the Select a database to connect step, select a MySQL database.
      2. In the Enter the required MySQL credentials step, enter the connection information in the HOST, PORT, DATABASE NAME, USERNAME, and PASSWORD fields based on the connection string obtained in Step 1. You can enter a custom value for DISPLAY NAME.
    3. Click CONNECT and then click FINISH.

    Step 3: Import data and create a table

    1. Log in to OceanBase Database by using the connection string obtained in Step 1 and create a table by using the following statement:

      CREATE TABLE earthquakes (
       Place VARCHAR(255),
       Latitude DECIMAL(10, 6),
       Longitude DECIMAL(10, 6),
       Country VARCHAR(100),
       Continent VARCHAR(100),
       Magnitude DECIMAL(3, 1)
      );
      
    2. Use the LOAD DATA statement to import the prepared dataset to the table. Here is a sample statement:

      LOAD DATA INFILE '/path/earthquake_dataset.csv'
      INTO TABLE earthquakes
      FIELDS TERMINATED BY ','
      ENCLOSED BY '"'
      LINES TERMINATED BY '\n'
      IGNORE 1 LINES
      (Place, Latitude, Longitude, Country, Continent, Magnitude);
      

      If the dataset contains a large amount of data or the data to be imported needs to be converted, you can use obloader to import the dataset.

      After the dataset is imported, execute the following statement for verification:

      obclient> SELECT COUNT(*) FROM earthquakes;
      +----------+
      | COUNT(*) |
      +----------+
      |     1264 |
      +----------+
      1 row in set
      

    Step 4: Create a dataset in Superset

    1. Go back to the Superset console. Click the plus sign (+) in the upper-right corner and choose Data > Create dataset.

    2. On the New dataset page, configure the following parameters.

      Parameter Description
      DATABASE Select the database name specified for DISPLAY NAME in Step 2.
      SCHEMA Select the OceanBase database created in Step 1.
      TABLE Select the table created in Step 3.
    3. Click CREATE DATASET AND CREATE CHART.

    What to do next

    After you create a dataset, you can select a chart type, click CREATE NEW CHART to create a chart, and configure the chart as needed. For more information, see Superset documentation.

    Previous topic

    Linkis
    Last

    Next topic

    Excel
    Next
    What is on this page
    Prerequisites
    Procedure
    Step 1: Obtain the OceanBase Database connection string
    Step 2: Connect to OceanBase Database from the Superset console
    Step 3: Import data and create a table
    Step 4: Create a dataset in Superset
    What to do next