This is an automated email from the ASF dual-hosted git repository.
catpineapple pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 3134e31c915 [docs](BI)add metabase docs (#3309)
3134e31c915 is described below
commit 3134e31c915acc88e7f8734d0f2b217e23626278
Author: catpineapple <[email protected]>
AuthorDate: Tue Jan 27 19:13:38 2026 +0800
[docs](BI)add metabase docs (#3309)
## Versions
- [ ] dev
- [ ] 4.x
- [ ] 3.x
- [ ] 2.1
## Languages
- [ ] Chinese
- [ ] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
docs/ecosystem/bi/metabase.md | 270 ++++++++++++++++++++
.../current/ecosystem/bi/metabase.md | 269 ++++++++++++++++++++
.../version-2.1/ecosystem/bi/metabase.md | 271 +++++++++++++++++++++
.../version-3.x/ecosystem/bi/metabase.md | 271 +++++++++++++++++++++
.../version-4.x/ecosystem/bi/metabase.md | 271 +++++++++++++++++++++
sidebars.ts | 1 +
static/images/ecomsystem/metabase/metabase-01.png | Bin 0 -> 189436 bytes
static/images/ecomsystem/metabase/metabase-02.png | Bin 0 -> 33436 bytes
static/images/ecomsystem/metabase/metabase-03.png | Bin 0 -> 35904 bytes
static/images/ecomsystem/metabase/metabase-04.png | Bin 0 -> 35282 bytes
static/images/ecomsystem/metabase/metabase-05.png | Bin 0 -> 92720 bytes
static/images/ecomsystem/metabase/metabase-06.png | Bin 0 -> 60895 bytes
static/images/ecomsystem/metabase/metabase-07.png | Bin 0 -> 48120 bytes
static/images/ecomsystem/metabase/metabase-08.png | Bin 0 -> 167479 bytes
static/images/ecomsystem/metabase/metabase-09.png | Bin 0 -> 149572 bytes
static/images/ecomsystem/metabase/metabase-10.png | Bin 0 -> 155948 bytes
static/images/ecomsystem/metabase/metabase-11.png | Bin 0 -> 117769 bytes
static/images/ecomsystem/metabase/metabase-12.png | Bin 0 -> 129905 bytes
static/images/ecomsystem/metabase/metabase-13.png | Bin 0 -> 85291 bytes
static/images/ecomsystem/metabase/metabase-14.png | Bin 0 -> 92732 bytes
static/images/ecomsystem/metabase/metabase-15.png | Bin 0 -> 30391 bytes
.../version-2.1/ecosystem/bi/metabase.md | 270 ++++++++++++++++++++
.../version-3.x/ecosystem/bi/metabase.md | 270 ++++++++++++++++++++
.../version-4.x/ecosystem/bi/metabase.md | 270 ++++++++++++++++++++
versioned_sidebars/version-2.1-sidebars.json | 1 +
versioned_sidebars/version-3.x-sidebars.json | 1 +
versioned_sidebars/version-4.x-sidebars.json | 1 +
27 files changed, 2166 insertions(+)
diff --git a/docs/ecosystem/bi/metabase.md b/docs/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..b3bb143ff99
--- /dev/null
+++ b/docs/ecosystem/bi/metabase.md
@@ -0,0 +1,270 @@
+---
+{
+ "title": "Metabase",
+ "language": "en",
+ "description": "Metabase is an open-source business intelligence tool that
provides simple and easy-to-use data analysis and visualization capabilities,
supports rich data source connections, and enables the rapid construction of
interactive dashboards."
+}
+---
+
+Metabase is an open-source business intelligence tool that provides simple and
easy-to-use data analysis and visualization capabilities, supports rich data
source connections, and enables the rapid construction of interactive
dashboards. Its key features include a user-friendly interface, ease of use,
support for self-service analysis, visualization dashboard creation, data
drill-down exploration, and an integrated SQL query editor for SQL queries and
data export.
+
+The Metabase Apache Doris Driver allows Metabase to connect to Apache Doris
databases, enabling querying and visualization of both internal and external
Doris data.
+
+This driver allows Metabase to integrate Apache Doris databases and tables as
data sources. To enable this feature, follow the setup guide below:
+
+- Installing and configuring the driver
+- Configuring the Apache Doris data source in Metabase
+- Building visualizations in Metabase
+- Connection and usage tips
+
+## Installing Metabase and the Doris Driver
+
+### Prerequisites
+
+1. Download and install Metabase version 0.48.0 or later. See the [Metabase
Installation
Documentation](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
for details.
+2. Prepare the Apache Doris cluster.
+
+### Install the Doris Driver
+
+First, you need to download the latest
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar).
+
+Then install the driver. The installation method depends on your Metabase
deployment method:
+
+#### Metabase Standard Deployment
+
+1. Download the Driver
+
+2. Create the Metabase plugin directory (if it doesn't exist):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. Copy the JAR file to the plugin directory:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. Restart the Metabase service
+
+#### Metabase Docker Deployment
+
+If Metabase is started using Docker, it is recommended to start it by mounting
`doris.metabase-driver.jar`. The plugin path inside the Docker container is
`/plugins/`.
+
+1. Download the Driver
+
+2. Start Metabase using the following command:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## Configuring a Doris Data Source in Metabase
+
+Now that you have **Metabase** and **metabase-doris-driver** installed, let's
see how to define a data source in Metabase that connects to the tpch database
in Doris.
+
+### Connection Parameter Description
+
+The following parameters need to be configured when connecting to Apache Doris:
+
+| Parameters | Meaning | Example |
+|------|------|------|
+| **Display Name** | Data source display name | Doris-TPCH |
+| **Host** | Doris FE node address | 127.0.0.1 |
+| **Port** | Doris Query Port (MySQL protocol port) | 9030 |
+| **Catalog name** | Catalog name (optional, defaults to internal) | internal |
+| **Database name** | Database name (required) | tpch |
+| **Username** | Username | root |
+| **Password** | Password | your_password |
+
+**Database Name Format Explanation:**
+
+- **Internal Tables**: Enter the database name directly, such as `tpch`. The
system will automatically use the `internal` catalog.
+- **External Tables/Data Lake**: Enter the Catalog configuration. If only
linking internal tables, this item is not required.
+
+### Configuration Steps
+
+1. Start Metabase and log in.
+
+2. Click the gear icon in the upper right corner and select **Admin Settings**.
+
+
+
+3. In the left-hand menu, select **Databases**, and click the **Add database**
button in the upper right corner.
+
+
+
+4. In the **Database type** dropdown menu, select **Apache Doris**.
+
+
+
+5. Fill in the connection information:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. Click **Save** to save the configuration.
+
+7. Metabase will automatically test the connection and synchronize database
metadata. If the connection is successful, a success message will be displayed.
+
+
+
+At this point, the data source configuration is complete! Next, we can build
visualizations in Metabase.
+
+## Building Visualizations in Metabase
+
+We choose TPC-H data as the data source. Refer to [this
document](../../benchmark/tpch) for instructions on building the Doris TPC-H
data source.
+
+Now that we have configured the Doris data source in Metabase, let's visualize
the data...
+
+Suppose we need to analyze the order amount growth curve over time for
different freight methods for cost analysis.
+
+### Creating a Question
+
+1. Click the **New +** button in the upper right corner of the homepage and
select **Question**.
+
+
+
+2. Select the data source:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### Building Custom Metrics Using SQL
+
+To calculate revenue, we need to use a custom SQL expression:
+
+1. Click the **view sql** switch in the upper right corner, then click
**convert this question to SQL** to edit the SQL.
+
+
+
+2. Enter the following SQL query:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. Click the **Visualize** button in the lower right corner to view the
results.
+
+
+
+
+### Configure Visualization Charts
+
+1. The default display is a table. Click the **Visualization** button in the
lower left corner and select the **Line** chart type.
+
+
+
+2. Configure chart parameters as needed (metabase automatically configures as
follows):
+ - **X-axis**: ship_month (shipping month)
+ - **Y-axis**: revenue (revenue)
+ - **Series**: l_shipmode (shipping mode)
+
+3. Customize chart style:
+ - Click the **Settings** icon to adjust colors, labels, legend position,
etc.
+ - In the **Display** tab, you can set axis titles, value formats, etc.
+
+4. After configuring the chart, click **Save** in the upper right corner.
+
+5. Enter the issue name: **my-tpch**, and select the collection to save to.
+
+
+
+### Creating a Dashboard
+
+1. Click **+ New** → **Dashboard** to create a new dashboard. Enter the
dashboard name: **my-tpch**
+
+
+
+2. Click **Add a chart** to add the saved question to the dashboard.
+
+
+
+3. Adjust the chart position and size, and click **Save** in the upper right
corner to save the dashboard.
+
+
+
+At this point, Metabase has been successfully connected to Apache Doris, and
data analysis and visualization dashboard creation have been implemented!
+
+## Advanced Features
+
+### Accessing External Data Using Catalogs
+
+Doris supports multi-catalog functionality, allowing queries to external data
sources and cross-data source queries. When using it in Metabase:
+
+1. Configure `Catalog` in the Links configuration interface, and configure the
external database under that catalog in `Database`, for example:
+ `catalog: hive_catalog`, `database: warehouse` - Access the warehouse
database named hive_catalog
+
+
+
+2. Or explicitly specify the Catalog in an SQL query:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### Using Parameterized Queries
+
+Metabase supports using variables in SQL queries, making it easy to create
interactive dashboards:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+After saving, data can be dynamically filtered in the dashboard using dropdown
menus or date pickers.
+
+### Performance Optimization Recommendations
+
+1. **Use Partition Clipping**: Add a partition column filter condition to the
WHERE clause.
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **Utilize Materialized Views:** For complex aggregation queries, creating
materialized views in Doris can accelerate the query process.
+
+3. **Control Result Set Size:** Use LIMIT to limit the number of rows
returned, avoiding loading too much data at once.
+
+4. **Query Caching:** Metabase automatically caches query results; setting
appropriate cache times can improve performance.
+
+### Connection and Usage Tips
+
+- **Driver Installation:** Ensure `doris.metabase-driver.jar` is placed in the
Metabase `plugins` directory and restart Metabase.
+- **Time Zone Settings:** If you encounter time zone issues, add
`serverTimezone=Asia/Shanghai` to the JDBC connection string.
+- **Partitioned Table Optimization:** Creating appropriate Doris partitioned
tables, dividing them by time and bucketing them, can effectively reduce the
amount of data scanned in queries.
+- **Network Connection:** It is recommended to use a VPC private connection to
avoid security risks introduced by public network access.
+- **Access Control:** Fine-tune Doris user account roles and access
permissions, following the principle of least privilege.
+- **Metadata Synchronization:** When Doris... When the table structure
changes, manually synchronize it by clicking "Sync database schema now" on the
Metabase management page.
+- **Performance Monitoring**: For slow queries, you can use `SHOW QUERY
PROFILE` in Doris to analyze performance bottlenecks.
+
+### Data Type Display Anomalies
+
+- Ensure you are using the latest version of the Doris Driver.
+- Doris largeint types need to be explicitly converted in SQL.
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
+
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/bi/metabase.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..cdad151355f
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/bi/metabase.md
@@ -0,0 +1,269 @@
+---
+{
+ "title": "Metabase",
+ "language": "zh-CN",
+ "description": "Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。"
+}
+---
+
+Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。该工具主要特点是界面友好、易于上手、支持自助分析、可视化看板制作、数据钻取探索,还集成了一个
SQL 查询编辑器,可以进行 SQL 查询和数据导出等。
+
+通过 Metabase Apache Doris Driver,可以让 Metabase 连接到 Apache Doris 数据库,实现对 Doris
内部数据和外部数据的查询和可视化处理。
+
+通过这个驱动程序,Metabase 可以将 Apache Doris 数据库和表作为数据源进行集成。要启用此功能,请遵循下面的设置指南:
+
+- 安装和配置驱动程序
+- 在 Metabase 中配置 Apache Doris 数据源
+- 在 Metabase 中构建可视化
+- 连接和使用技巧
+
+## 安装 Metabase 和 Doris 驱动程序
+
+### 前置要求
+
+1. 下载并安装 Metabase 0.48.0 及以上版本。具体参见 [Metabase
安装文档](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
+2. 准备 Apache Doris 集群
+
+### 安装 Doris 驱动程序
+
+首先需要下载最新的
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar)
+
+然后进行驱动安装,安装方式视 metabase 部署方式而定:
+
+#### metabase 常规部署
+
+1. 下载 Driver
+
+2. 创建 Metabase 插件目录(如果不存在):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. 将 JAR 文件复制到插件目录:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. 重启 Metabase 服务
+
+#### metabase docker 部署
+
+如果 metabase 使用的是 docker 启动,则建议通过挂载 `doris.metabase-driver.jar` 的方式启动,docker
容器内部的插件路径为 `/plugins/`
+
+1. 下载 Driver
+
+2. 参考如下启动命令启动 Metabase:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## 在 Metabase 中配置 Doris 数据源
+
+现在您已安装了 **Metabase** 和 **metabase-doris-driver**,让我们来看一下如何在 Metabase 中定义一个连接到
Doris 中 tpch 数据库的数据源。
+
+### 连接参数说明
+
+连接 Apache Doris 时需要配置以下参数:
+
+| 参数 | 含义 | 示例 |
+|------|------|------|
+| **Display Name** | 数据源显示名称 | Doris-TPCH |
+| **Host** | Doris FE 节点地址 | 127.0.0.1 |
+| **Port** | Doris Query Port(MySQL 协议端口) | 9030 |
+| **Catalog name** | Catalog 名(可选,默认为 internal) | internal |
+| **Database name** | 数据库名(必写) | tpch |
+| **Username** | 用户名 | root |
+| **Password** | 密码 | your_password |
+
+**数据库名称格式说明:**
+
+- **内表**:直接填写数据库名,如 `tpch`,系统会自动使用 `internal` catalog
+- **外表/数据湖**:填写 Catalog 配置,如仅链接内表,则无需关注此项。
+
+### 配置步骤
+
+1. 启动 Metabase 并完成登录
+
+2. 点击右上角的齿轮图标,选择 **Admin Settings**(管理设置)
+
+
+
+3. 在左侧菜单中选择 **Databases**(数据库),点击右上角的 **Add database** 按钮
+
+
+
+4. 在 **Database type** 下拉框中选择 **Apache Doris**
+
+
+
+5. 填写连接信息:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. 点击 **Save** 保存配置
+
+7. Metabase 会自动测试连接并同步数据库元数据。如果连接成功,会显示成功提示
+
+
+
+至此,数据源配置完成!接下来就可以在 Metabase 中构建可视化了。
+
+## 在 Metabase 中构建可视化
+
+我们选择 TPC-H 数据作为数据源,Doris TPC-H 数据源构建方式参考[此文档](../../benchmark/tpch)。
+
+现在我们在 Metabase 中配置了 Doris 数据源,让我们可视化数据...
+
+假设我们需要分析不同货运方式的订单金额随时间增长曲线,用以成本分析。
+
+### 创建问题(Question)
+
+1. 点击主页右上角的 **New +** 按钮,选择 **Question**
+
+
+
+2. 选择数据源:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### 使用 SQL 构建自定义指标
+
+为了计算收入(Revenue),我们需要使用自定义 SQL 表达式:
+
+1. 点击右上角切换 **view sql**,然后点击 **convert this question to SQL** 编辑 SQL
+
+
+
+2. 输入以下 SQL 查询:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. 点击右下角的 **Visualize** 按钮查看结果
+
+
+
+
+### 配置可视化图表
+
+1. 默认显示为表格。点击左下角的 **Visualization** 按钮,选择 **Line** 图表类型
+
+
+
+2. 可按需配置图表参数(metabase 自动配置如下):
+ - **X-axis**: ship_month(发货月份)
+ - **Y-axis**: revenue(收入)
+ - **Series**: l_shipmode(货运方式)
+
+3. 自定义图表样式:
+ - 点击 **Settings** 图标,可以调整颜色、标签、图例位置等
+ - 在 **Display** 标签页可以设置坐标轴标题、数值格式等
+
+4. 图表配置完成后,点击右上角的 **Save** 保存
+
+5. 输入问题名称:**my-tpch**,选择保存到的集合(Collection)
+
+
+
+### 创建仪表盘(Dashboard)
+
+1. 点击 **+ New** → **Dashboard** 创建新仪表盘,输入仪表盘名称:**my-tpch**
+
+
+
+2. 点击 **Add a chart** 将已保存的 question 添加到仪表盘
+
+
+
+3. 调整图表位置和大小,点击右上角 **Save** 保存仪表盘
+
+
+
+至此,已经成功将 Metabase 连接到 Apache Doris,并实现了数据分析和可视化看板制作!
+
+## 高级功能
+
+### 使用 Catalog 访问外部数据
+
+Doris 支持多 Catalog 功能,可以查询外部数据源 和 跨数据源的数据查询。在 Metabase 中使用时:
+
+1. 在 链接配置界面配置 `Catalog`, 在 `Database` 中配置 该 catalog 下的外表数据库,例如:
+ `catalog: hive_catalog`, `database: warehouse` - 访问 名为 hive_catalog 中的
warehouse 数据库
+
+
+
+2. 或者在 SQL 查询中显式指定 Catalog:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### 使用参数化查询
+
+Metabase 支持在 SQL 查询中使用变量,方便创建交互式仪表盘:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+保存后,在仪表盘中可以通过下拉框或日期选择器动态筛选数据。
+
+### 性能优化建议
+
+1. **使用分区裁剪**:在 WHERE 子句中添加分区列的过滤条件
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **利用物化视图**:对于复杂的聚合查询,可以在 Doris 中创建物化视图加速查询
+
+3. **控制结果集大小**:使用 LIMIT 限制返回行数,避免一次性加载过多数据
+
+4. **查询缓存**:Metabase 会自动缓存查询结果,合理设置缓存时间可以提升性能
+
+### 连接和使用技巧
+
+- **驱动安装**:确保将 `doris.metabase-driver.jar` 放在 Metabase 的 `plugins` 目录下,并重启
Metabase
+- **时区设置**:如果遇到时区问题,可以在 JDBC 连接字符串中添加 `serverTimezone=Asia/Shanghai`
+- **分区表优化**:合理创建 Doris 分区表,按时间分区分桶,可有效减少查询扫描的数据量
+- **网络连接**:建议使用 VPC 私有连接,避免公网访问引入安全风险
+- **权限控制**:细化 Doris 用户账号角色和访问权限,遵循最小权限原则
+- **元数据同步**:当 Doris 中的表结构发生变化时,在 Metabase 管理页面点击 "Sync database schema now"
手动同步
+- **性能监控**:对于慢查询,可以在 Doris 中使用 `SHOW QUERY PROFILE` 分析性能瓶颈
+
+### 数据类型显示异常
+
+- 确保使用最新版本的 Doris Driver
+- Doris largeint 类型需要在 SQL 中显式转换:
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/bi/metabase.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..92daf789205
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/ecosystem/bi/metabase.md
@@ -0,0 +1,271 @@
+---
+{
+ "title": "Metabase",
+ "language": "zh-CN",
+ "description": "Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。"
+}
+---
+
+Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。该工具主要特点是界面友好、易于上手、支持自助分析、可视化看板制作、数据钻取探索,还集成了一个
SQL 查询编辑器,可以进行 SQL 查询和数据导出等。
+
+通过 Metabase Apache Doris Driver,可以让 Metabase 连接到 Apache Doris 数据库,实现对 Doris
内部数据和外部数据的查询和可视化处理。
+
+通过这个驱动程序,Metabase 可以将 Apache Doris 数据库和表作为数据源进行集成。要启用此功能,请遵循下面的设置指南:
+
+- 安装和配置驱动程序
+- 在 Metabase 中配置 Apache Doris 数据源
+- 在 Metabase 中构建可视化
+- 连接和使用技巧
+
+## 安装 Metabase 和 Doris 驱动程序
+
+### 前置要求
+
+1. 下载并安装 Metabase 0.48.0 及以上版本。具体参见 [Metabase
安装文档](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
+2. 准备 Apache Doris 集群
+
+### 安装 Doris 驱动程序
+
+首先需要下载最新的
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar)
+
+然后进行驱动安装,安装方式视 metabase 部署方式而定:
+
+#### metabase 常规部署
+
+1. 下载 Driver
+
+2. 创建 Metabase 插件目录(如果不存在):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. 将 JAR 文件复制到插件目录:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. 重启 Metabase 服务
+
+#### metabase docker 部署
+
+如果 metabase 使用的是 docker 启动,则建议通过挂载 `doris.metabase-driver.jar` 的方式启动,docker
容器内部的插件路径为 `/plugins/`
+
+1. 下载 Driver
+
+2. 参考如下启动命令启动 Metabase:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## 在 Metabase 中配置 Doris 数据源
+
+现在您已安装了 **Metabase** 和 **metabase-doris-driver**,让我们来看一下如何在 Metabase 中定义一个连接到
Doris 中 tpch 数据库的数据源。
+
+### 连接参数说明
+
+连接 Apache Doris 时需要配置以下参数:
+
+| 参数 | 含义 | 示例 |
+|------|------|------|
+| **Display Name** | 数据源显示名称 | Doris-TPCH |
+| **Host** | Doris FE 节点地址 | 127.0.0.1 |
+| **Port** | Doris Query Port(MySQL 协议端口) | 9030 |
+| **Catalog name** | Catalog 名(可选,默认为 internal) | internal |
+| **Database name** | 数据库名(必写) | tpch |
+| **Username** | 用户名 | root |
+| **Password** | 密码 | your_password |
+
+**数据库名称格式说明:**
+
+- **内表**:直接填写数据库名,如 `tpch`,系统会自动使用 `internal` catalog
+- **外表/数据湖**:填写 Catalog 配置,如仅链接内表,则无需关注此项。
+
+### 配置步骤
+
+1. 启动 Metabase 并完成登录
+
+2. 点击右上角的齿轮图标,选择 **Admin Settings**(管理设置)
+
+
+
+3. 在左侧菜单中选择 **Databases**(数据库),点击右上角的 **Add database** 按钮
+
+
+
+4. 在 **Database type** 下拉框中选择 **Apache Doris**
+
+
+
+5. 填写连接信息:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. 点击 **Save** 保存配置
+
+7. Metabase 会自动测试连接并同步数据库元数据。如果连接成功,会显示成功提示
+
+
+
+至此,数据源配置完成!接下来就可以在 Metabase 中构建可视化了。
+
+## 在 Metabase 中构建可视化
+
+我们选择 TPC-H 数据作为数据源,Doris TPC-H 数据源构建方式参考[此文档](../../benchmark/tpch)。
+
+现在我们在 Metabase 中配置了 Doris 数据源,让我们可视化数据...
+
+假设我们需要分析不同货运方式的订单金额随时间增长曲线,用以成本分析。
+
+### 创建问题(Question)
+
+1. 点击主页右上角的 **New +** 按钮,选择 **Question**
+
+
+
+2. 选择数据源:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### 使用 SQL 构建自定义指标
+
+为了计算收入(Revenue),我们需要使用自定义 SQL 表达式:
+
+1. 点击右上角切换 **view sql**,然后点击 **convert this question to SQL** 编辑 SQL
+
+
+
+2. 输入以下 SQL 查询:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. 点击右下角的 **Visualize** 按钮查看结果
+
+
+
+
+### 配置可视化图表
+
+1. 默认显示为表格。点击左下角的 **Visualization** 按钮,选择 **Line** 图表类型
+
+
+
+2. 可按需配置图表参数(metabase 自动配置如下):
+ - **X-axis**: ship_month(发货月份)
+ - **Y-axis**: revenue(收入)
+ - **Series**: l_shipmode(货运方式)
+
+3. 自定义图表样式:
+ - 点击 **Settings** 图标,可以调整颜色、标签、图例位置等
+ - 在 **Display** 标签页可以设置坐标轴标题、数值格式等
+
+4. 图表配置完成后,点击右上角的 **Save** 保存
+
+5. 输入问题名称:**my-tpch**,选择保存到的集合(Collection)
+
+
+
+### 创建仪表盘(Dashboard)
+
+1. 点击 **+ New** → **Dashboard** 创建新仪表盘,输入仪表盘名称:**my-tpch**
+
+
+
+2. 点击 **Add a chart** 将已保存的 question 添加到仪表盘
+
+
+
+3. 调整图表位置和大小,点击右上角 **Save** 保存仪表盘
+
+
+
+至此,已经成功将 Metabase 连接到 Apache Doris,并实现了数据分析和可视化看板制作!
+
+## 高级功能
+
+### 使用 Catalog 访问外部数据
+
+Doris 支持多 Catalog 功能,可以查询外部数据源 和 跨数据源的数据查询。在 Metabase 中使用时:
+
+1. 在 链接配置界面配置 `Catalog`, 在 `Database` 中配置 该 catalog 下的外表数据库,例如:
+ `catalog: hive_catalog`, `database: warehouse` - 访问 名为 hive_catalog 中的
warehouse 数据库
+
+
+
+
+
+2. 或者在 SQL 查询中显式指定 Catalog:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### 使用参数化查询
+
+Metabase 支持在 SQL 查询中使用变量,方便创建交互式仪表盘:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+保存后,在仪表盘中可以通过下拉框或日期选择器动态筛选数据。
+
+### 性能优化建议
+
+1. **使用分区裁剪**:在 WHERE 子句中添加分区列的过滤条件
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **利用物化视图**:对于复杂的聚合查询,可以在 Doris 中创建物化视图加速查询
+
+3. **控制结果集大小**:使用 LIMIT 限制返回行数,避免一次性加载过多数据
+
+4. **查询缓存**:Metabase 会自动缓存查询结果,合理设置缓存时间可以提升性能
+
+### 连接和使用技巧
+
+- **驱动安装**:确保将 `doris.metabase-driver.jar` 放在 Metabase 的 `plugins` 目录下,并重启
Metabase
+- **时区设置**:如果遇到时区问题,可以在 JDBC 连接字符串中添加 `serverTimezone=Asia/Shanghai`
+- **分区表优化**:合理创建 Doris 分区表,按时间分区分桶,可有效减少查询扫描的数据量
+- **网络连接**:建议使用 VPC 私有连接,避免公网访问引入安全风险
+- **权限控制**:细化 Doris 用户账号角色和访问权限,遵循最小权限原则
+- **元数据同步**:当 Doris 中的表结构发生变化时,在 Metabase 管理页面点击 "Sync database schema now"
手动同步
+- **性能监控**:对于慢查询,可以在 Doris 中使用 `SHOW QUERY PROFILE` 分析性能瓶颈
+
+### 数据类型显示异常
+
+- 确保使用最新版本的 Doris Driver
+- Doris largeint 类型需要在 SQL 中显式转换:
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/ecosystem/bi/metabase.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..92daf789205
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/ecosystem/bi/metabase.md
@@ -0,0 +1,271 @@
+---
+{
+ "title": "Metabase",
+ "language": "zh-CN",
+ "description": "Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。"
+}
+---
+
+Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。该工具主要特点是界面友好、易于上手、支持自助分析、可视化看板制作、数据钻取探索,还集成了一个
SQL 查询编辑器,可以进行 SQL 查询和数据导出等。
+
+通过 Metabase Apache Doris Driver,可以让 Metabase 连接到 Apache Doris 数据库,实现对 Doris
内部数据和外部数据的查询和可视化处理。
+
+通过这个驱动程序,Metabase 可以将 Apache Doris 数据库和表作为数据源进行集成。要启用此功能,请遵循下面的设置指南:
+
+- 安装和配置驱动程序
+- 在 Metabase 中配置 Apache Doris 数据源
+- 在 Metabase 中构建可视化
+- 连接和使用技巧
+
+## 安装 Metabase 和 Doris 驱动程序
+
+### 前置要求
+
+1. 下载并安装 Metabase 0.48.0 及以上版本。具体参见 [Metabase
安装文档](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
+2. 准备 Apache Doris 集群
+
+### 安装 Doris 驱动程序
+
+首先需要下载最新的
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar)
+
+然后进行驱动安装,安装方式视 metabase 部署方式而定:
+
+#### metabase 常规部署
+
+1. 下载 Driver
+
+2. 创建 Metabase 插件目录(如果不存在):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. 将 JAR 文件复制到插件目录:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. 重启 Metabase 服务
+
+#### metabase docker 部署
+
+如果 metabase 使用的是 docker 启动,则建议通过挂载 `doris.metabase-driver.jar` 的方式启动,docker
容器内部的插件路径为 `/plugins/`
+
+1. 下载 Driver
+
+2. 参考如下启动命令启动 Metabase:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## 在 Metabase 中配置 Doris 数据源
+
+现在您已安装了 **Metabase** 和 **metabase-doris-driver**,让我们来看一下如何在 Metabase 中定义一个连接到
Doris 中 tpch 数据库的数据源。
+
+### 连接参数说明
+
+连接 Apache Doris 时需要配置以下参数:
+
+| 参数 | 含义 | 示例 |
+|------|------|------|
+| **Display Name** | 数据源显示名称 | Doris-TPCH |
+| **Host** | Doris FE 节点地址 | 127.0.0.1 |
+| **Port** | Doris Query Port(MySQL 协议端口) | 9030 |
+| **Catalog name** | Catalog 名(可选,默认为 internal) | internal |
+| **Database name** | 数据库名(必写) | tpch |
+| **Username** | 用户名 | root |
+| **Password** | 密码 | your_password |
+
+**数据库名称格式说明:**
+
+- **内表**:直接填写数据库名,如 `tpch`,系统会自动使用 `internal` catalog
+- **外表/数据湖**:填写 Catalog 配置,如仅链接内表,则无需关注此项。
+
+### 配置步骤
+
+1. 启动 Metabase 并完成登录
+
+2. 点击右上角的齿轮图标,选择 **Admin Settings**(管理设置)
+
+
+
+3. 在左侧菜单中选择 **Databases**(数据库),点击右上角的 **Add database** 按钮
+
+
+
+4. 在 **Database type** 下拉框中选择 **Apache Doris**
+
+
+
+5. 填写连接信息:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. 点击 **Save** 保存配置
+
+7. Metabase 会自动测试连接并同步数据库元数据。如果连接成功,会显示成功提示
+
+
+
+至此,数据源配置完成!接下来就可以在 Metabase 中构建可视化了。
+
+## 在 Metabase 中构建可视化
+
+我们选择 TPC-H 数据作为数据源,Doris TPC-H 数据源构建方式参考[此文档](../../benchmark/tpch)。
+
+现在我们在 Metabase 中配置了 Doris 数据源,让我们可视化数据...
+
+假设我们需要分析不同货运方式的订单金额随时间增长曲线,用以成本分析。
+
+### 创建问题(Question)
+
+1. 点击主页右上角的 **New +** 按钮,选择 **Question**
+
+
+
+2. 选择数据源:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### 使用 SQL 构建自定义指标
+
+为了计算收入(Revenue),我们需要使用自定义 SQL 表达式:
+
+1. 点击右上角切换 **view sql**,然后点击 **convert this question to SQL** 编辑 SQL
+
+
+
+2. 输入以下 SQL 查询:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. 点击右下角的 **Visualize** 按钮查看结果
+
+
+
+
+### 配置可视化图表
+
+1. 默认显示为表格。点击左下角的 **Visualization** 按钮,选择 **Line** 图表类型
+
+
+
+2. 可按需配置图表参数(metabase 自动配置如下):
+ - **X-axis**: ship_month(发货月份)
+ - **Y-axis**: revenue(收入)
+ - **Series**: l_shipmode(货运方式)
+
+3. 自定义图表样式:
+ - 点击 **Settings** 图标,可以调整颜色、标签、图例位置等
+ - 在 **Display** 标签页可以设置坐标轴标题、数值格式等
+
+4. 图表配置完成后,点击右上角的 **Save** 保存
+
+5. 输入问题名称:**my-tpch**,选择保存到的集合(Collection)
+
+
+
+### 创建仪表盘(Dashboard)
+
+1. 点击 **+ New** → **Dashboard** 创建新仪表盘,输入仪表盘名称:**my-tpch**
+
+
+
+2. 点击 **Add a chart** 将已保存的 question 添加到仪表盘
+
+
+
+3. 调整图表位置和大小,点击右上角 **Save** 保存仪表盘
+
+
+
+至此,已经成功将 Metabase 连接到 Apache Doris,并实现了数据分析和可视化看板制作!
+
+## 高级功能
+
+### 使用 Catalog 访问外部数据
+
+Doris 支持多 Catalog 功能,可以查询外部数据源 和 跨数据源的数据查询。在 Metabase 中使用时:
+
+1. 在 链接配置界面配置 `Catalog`, 在 `Database` 中配置 该 catalog 下的外表数据库,例如:
+ `catalog: hive_catalog`, `database: warehouse` - 访问 名为 hive_catalog 中的
warehouse 数据库
+
+
+
+
+
+2. 或者在 SQL 查询中显式指定 Catalog:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### 使用参数化查询
+
+Metabase 支持在 SQL 查询中使用变量,方便创建交互式仪表盘:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+保存后,在仪表盘中可以通过下拉框或日期选择器动态筛选数据。
+
+### 性能优化建议
+
+1. **使用分区裁剪**:在 WHERE 子句中添加分区列的过滤条件
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **利用物化视图**:对于复杂的聚合查询,可以在 Doris 中创建物化视图加速查询
+
+3. **控制结果集大小**:使用 LIMIT 限制返回行数,避免一次性加载过多数据
+
+4. **查询缓存**:Metabase 会自动缓存查询结果,合理设置缓存时间可以提升性能
+
+### 连接和使用技巧
+
+- **驱动安装**:确保将 `doris.metabase-driver.jar` 放在 Metabase 的 `plugins` 目录下,并重启
Metabase
+- **时区设置**:如果遇到时区问题,可以在 JDBC 连接字符串中添加 `serverTimezone=Asia/Shanghai`
+- **分区表优化**:合理创建 Doris 分区表,按时间分区分桶,可有效减少查询扫描的数据量
+- **网络连接**:建议使用 VPC 私有连接,避免公网访问引入安全风险
+- **权限控制**:细化 Doris 用户账号角色和访问权限,遵循最小权限原则
+- **元数据同步**:当 Doris 中的表结构发生变化时,在 Metabase 管理页面点击 "Sync database schema now"
手动同步
+- **性能监控**:对于慢查询,可以在 Doris 中使用 `SHOW QUERY PROFILE` 分析性能瓶颈
+
+### 数据类型显示异常
+
+- 确保使用最新版本的 Doris Driver
+- Doris largeint 类型需要在 SQL 中显式转换:
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/ecosystem/bi/metabase.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..ee9819e9824
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/ecosystem/bi/metabase.md
@@ -0,0 +1,271 @@
+---
+{
+ "title": "Metabase",
+ "language": "zh-CN",
+ "description": "Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。"
+}
+---
+
+Metabase
是一个开源的商业智能工具,提供简洁易用的数据分析和可视化功能,支持丰富的数据源连接,并能够快速构建交互式仪表盘。该工具主要特点是界面友好、易于上手、支持自助分析、可视化看板制作、数据钻取探索,还集成了一个
SQL 查询编辑器,可以进行 SQL 查询和数据导出等。
+
+通过 Metabase Apache Doris Driver,可以让 Metabase 连接到 Apache Doris 数据库,实现对 Doris
内部数据和外部数据的查询和可视化处理。
+
+通过这个驱动程序,Metabase 可以将 Apache Doris 数据库和表作为数据源进行集成。要启用此功能,请遵循下面的设置指南:
+
+- 安装和配置驱动程序
+- 在 Metabase 中配置 Apache Doris 数据源
+- 在 Metabase 中构建可视化
+- 连接和使用技巧
+
+## 安装 Metabase 和 Doris 驱动程序
+
+### 前置要求
+
+1. 下载并安装 Metabase 0.48.0 及以上版本。具体参见 [Metabase
安装文档](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
+2. 准备 Apache Doris 集群
+
+### 安装 Doris 驱动程序
+
+首先需要下载最新的
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar)
+
+然后进行驱动安装,安装方式视 metabase 部署方式而定:
+
+#### metabase 常规部署
+
+1. 下载 Driver
+
+2. 创建 Metabase 插件目录(如果不存在):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. 将 JAR 文件复制到插件目录:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. 重启 Metabase 服务
+
+#### metabase docker 部署
+
+如果 metabase 使用的是 docker 启动,则建议通过挂载 `doris.metabase-driver.jar` 的方式启动,docker
容器内部的插件路径为 `/plugins/`
+
+1. 下载 Driver
+
+2. 参考如下启动命令启动 Metabase:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## 在 Metabase 中配置 Doris 数据源
+
+现在您已安装了 **Metabase** 和 **metabase-doris-driver**,让我们来看一下如何在 Metabase 中定义一个连接到
Doris 中 tpch 数据库的数据源。
+
+### 连接参数说明
+
+连接 Apache Doris 时需要配置以下参数:
+
+| 参数 | 含义 | 示例 |
+|------|------|------|
+| **Display Name** | 数据源显示名称 | Doris-TPCH |
+| **Host** | Doris FE 节点地址 | 127.0.0.1 |
+| **Port** | Doris Query Port(MySQL 协议端口) | 9030 |
+| **Catalog name** | Catalog 名(可选,默认为 internal) | internal |
+| **Database name** | 数据库名(必写) | tpch |
+| **Username** | 用户名 | root |
+| **Password** | 密码 | your_password |
+
+**数据库名称格式说明:**
+
+- **内表**:直接填写数据库名,如 `tpch`,系统会自动使用 `internal` catalog
+- **外表/数据湖**:填写 Catalog 配置,如仅链接内表,则无需关注此项。
+
+### 配置步骤
+
+1. 启动 Metabase 并完成登录
+
+2. 点击右上角的齿轮图标,选择 **Admin Settings**(管理设置)
+
+
+
+3. 在左侧菜单中选择 **Databases**(数据库),点击右上角的 **Add database** 按钮
+
+
+
+4. 在 **Database type** 下拉框中选择 **Apache Doris**
+
+
+
+5. 填写连接信息:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. 点击 **Save** 保存配置
+
+7. Metabase 会自动测试连接并同步数据库元数据。如果连接成功,会显示成功提示
+
+
+
+至此,数据源配置完成!接下来就可以在 Metabase 中构建可视化了。
+
+## 在 Metabase 中构建可视化
+
+我们选择 TPC-H 数据作为数据源,Doris TPC-H 数据源构建方式参考[此文档](../../benchmark/tpch)。
+
+现在我们在 Metabase 中配置了 Doris 数据源,让我们可视化数据...
+
+假设我们需要分析不同货运方式的订单金额随时间增长曲线,用以成本分析。
+
+### 创建问题(Question)
+
+1. 点击主页右上角的 **New +** 按钮,选择 **Question**
+
+
+
+2. 选择数据源:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### 使用 SQL 构建自定义指标
+
+为了计算收入(Revenue),我们需要使用自定义 SQL 表达式:
+
+1. 点击右上角切换 **view sql**,然后点击 **convert this question to SQL** 编辑 SQL
+
+
+
+2. 输入以下 SQL 查询:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. 点击右下角的 **Visualize** 按钮查看结果
+
+
+
+
+### 配置可视化图表
+
+1. 默认显示为表格。点击左下角的 **Visualization** 按钮,选择 **Line** 图表类型
+
+
+
+2. 可按需配置图表参数(metabase 自动配置如下):
+ - **X-axis**: ship_month(发货月份)
+ - **Y-axis**: revenue(收入)
+ - **Series**: l_shipmode(货运方式)
+
+3. 自定义图表样式:
+ - 点击 **Settings** 图标,可以调整颜色、标签、图例位置等
+ - 在 **Display** 标签页可以设置坐标轴标题、数值格式等
+
+4. 图表配置完成后,点击右上角的 **Save** 保存
+
+5. 输入问题名称:**my-tpch**,选择保存到的集合(Collection)
+
+
+
+### 创建仪表盘(Dashboard)
+
+1. 点击 **+ New** → **Dashboard** 创建新仪表盘,输入仪表盘名称:**my-tpch**
+
+
+
+2. 点击 **Add a chart** 将已保存的 question 添加到仪表盘
+
+
+
+3. 调整图表位置和大小,点击右上角 **Save** 保存仪表盘
+
+
+
+至此,已经成功将 Metabase 连接到 Apache Doris,并实现了数据分析和可视化看板制作!
+
+## 高级功能
+
+### 使用 Catalog 访问外部数据
+
+Doris 支持多 Catalog 功能,可以查询外部数据源 和 跨数据源的数据查询。在 Metabase 中使用时:
+
+1. 在 链接配置界面配置 `Catalog`, 在 `Database` 中配置 该 catalog 下的外表数据库,例如:
+ `catalog: hive_catalog`, `database: warehouse` - 访问 名为 hive_catalog 中的
warehouse 数据库
+
+
+
+
+
+2. 或者在 SQL 查询中显式指定 Catalog:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### 使用参数化查询
+
+Metabase 支持在 SQL 查询中使用变量,方便创建交互式仪表盘:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+保存后,在仪表盘中可以通过下拉框或日期选择器动态筛选数据。
+
+### 性能优化建议
+
+1. **使用分区裁剪**:在 WHERE 子句中添加分区列的过滤条件
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **利用物化视图**:对于复杂的聚合查询,可以在 Doris 中创建物化视图加速查询
+
+3. **控制结果集大小**:使用 LIMIT 限制返回行数,避免一次性加载过多数据
+
+4. **查询缓存**:Metabase 会自动缓存查询结果,合理设置缓存时间可以提升性能
+
+### 连接和使用技巧
+
+- **驱动安装**:确保将 `doris.metabase-driver.jar` 放在 Metabase 的 `plugins` 目录下,并重启
Metabase
+- **时区设置**:如果遇到时区问题,可以在 JDBC 连接字符串中添加 `serverTimezone=Asia/Shanghai`
+- **分区表优化**:合理创建 Doris 分区表,按时间分区分桶,可有效减少查询扫描的数据量
+- **网络连接**:建议使用 VPC 私有连接,避免公网访问引入安全风险
+- **权限控制**:细化 Doris 用户账号角色和访问权限,遵循最小权限原则
+- **元数据同步**:当 Doris 中的表结构发生变化时,在 Metabase 管理页面点击 "Sync database schema now"
手动同步
+- **性能监控**:对于慢查询,可以在 Doris 中使用 `SHOW QUERY PROFILE` 分析性能瓶颈
+
+### 数据类型显示异常
+
+- 确保使用最新版本的 Doris Driver
+- Doris largeint 类型需要在 SQL 中显式转换:
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
diff --git a/sidebars.ts b/sidebars.ts
index be380eed883..4bc53b56efc 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -973,6 +973,7 @@ const sidebars: SidebarsConfig = {
items: [
'ecosystem/bi/apache-superset',
'ecosystem/bi/finebi',
+ 'ecosystem/bi/metabase',
'ecosystem/bi/powerbi',
'ecosystem/bi/tableau',
'ecosystem/bi/quicksight',
diff --git a/static/images/ecomsystem/metabase/metabase-01.png
b/static/images/ecomsystem/metabase/metabase-01.png
new file mode 100644
index 00000000000..0757a00144c
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-01.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-02.png
b/static/images/ecomsystem/metabase/metabase-02.png
new file mode 100644
index 00000000000..0e3097728c5
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-02.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-03.png
b/static/images/ecomsystem/metabase/metabase-03.png
new file mode 100644
index 00000000000..b221176d359
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-03.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-04.png
b/static/images/ecomsystem/metabase/metabase-04.png
new file mode 100644
index 00000000000..1424c289ffb
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-04.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-05.png
b/static/images/ecomsystem/metabase/metabase-05.png
new file mode 100644
index 00000000000..228a1ed3270
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-05.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-06.png
b/static/images/ecomsystem/metabase/metabase-06.png
new file mode 100644
index 00000000000..4f25099df20
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-06.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-07.png
b/static/images/ecomsystem/metabase/metabase-07.png
new file mode 100644
index 00000000000..8da2437fdeb
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-07.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-08.png
b/static/images/ecomsystem/metabase/metabase-08.png
new file mode 100644
index 00000000000..6d6e057ef55
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-08.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-09.png
b/static/images/ecomsystem/metabase/metabase-09.png
new file mode 100644
index 00000000000..5d07103169e
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-09.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-10.png
b/static/images/ecomsystem/metabase/metabase-10.png
new file mode 100644
index 00000000000..7c097866bcc
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-10.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-11.png
b/static/images/ecomsystem/metabase/metabase-11.png
new file mode 100644
index 00000000000..b4d7d1ab01b
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-11.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-12.png
b/static/images/ecomsystem/metabase/metabase-12.png
new file mode 100644
index 00000000000..2bbac0d96ae
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-12.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-13.png
b/static/images/ecomsystem/metabase/metabase-13.png
new file mode 100644
index 00000000000..cf44cdda30f
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-13.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-14.png
b/static/images/ecomsystem/metabase/metabase-14.png
new file mode 100644
index 00000000000..ebcf6c897a8
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-14.png
differ
diff --git a/static/images/ecomsystem/metabase/metabase-15.png
b/static/images/ecomsystem/metabase/metabase-15.png
new file mode 100644
index 00000000000..33f0adf7e3e
Binary files /dev/null and b/static/images/ecomsystem/metabase/metabase-15.png
differ
diff --git a/versioned_docs/version-2.1/ecosystem/bi/metabase.md
b/versioned_docs/version-2.1/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..d45ba25b9ae
--- /dev/null
+++ b/versioned_docs/version-2.1/ecosystem/bi/metabase.md
@@ -0,0 +1,270 @@
+---
+{
+ "title": "Metabase",
+ "language": "en",
+ "description": "Metabase is an open-source business intelligence tool that
provides simple and easy-to-use data analysis and visualization capabilities,
supports rich data source connections, and enables the rapid construction of
interactive dashboards."
+}
+---
+
+Metabase is an open-source business intelligence tool that provides simple and
easy-to-use data analysis and visualization capabilities, supports rich data
source connections, and enables the rapid construction of interactive
dashboards. Its key features include a user-friendly interface, ease of use,
support for self-service analysis, visualization dashboard creation, data
drill-down exploration, and an integrated SQL query editor for SQL queries and
data export.
+
+The Metabase Apache Doris Driver allows Metabase to connect to Apache Doris
databases, enabling querying and visualization of both internal and external
Doris data.
+
+This driver allows Metabase to integrate Apache Doris databases and tables as
data sources. To enable this feature, follow the setup guide below:
+
+- Installing and configuring the driver
+- Configuring the Apache Doris data source in Metabase
+- Building visualizations in Metabase
+- Connection and usage tips
+
+## Installing Metabase and the Doris Driver
+
+### Prerequisites
+
+1. Download and install Metabase version 0.48.0 or later. See the [Metabase
Installation
Documentation](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
for details.
+2. Prepare the Apache Doris cluster.
+
+### Install the Doris Driver
+
+First, you need to download the latest
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar).
+
+Then install the driver. The installation method depends on your Metabase
deployment method:
+
+#### Metabase Standard Deployment
+
+1. Download the Driver
+
+2. Create the Metabase plugin directory (if it doesn't exist):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. Copy the JAR file to the plugin directory:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. Restart the Metabase service
+
+#### Metabase Docker Deployment
+
+If Metabase is started using Docker, it is recommended to start it by mounting
`doris.metabase-driver.jar`. The plugin path inside the Docker container is
`/plugins/`.
+
+1. Download the Driver
+
+2. Start Metabase using the following command:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## Configuring a Doris Data Source in Metabase
+
+Now that you have **Metabase** and **metabase-doris-driver** installed, let's
see how to define a data source in Metabase that connects to the tpch database
in Doris.
+
+### Connection Parameter Description
+
+The following parameters need to be configured when connecting to Apache Doris:
+
+| Parameters | Meaning | Example |
+|------|------|------|
+| **Display Name** | Data source display name | Doris-TPCH |
+| **Host** | Doris FE node address | 127.0.0.1 |
+| **Port** | Doris Query Port (MySQL protocol port) | 9030 |
+| **Catalog name** | Catalog name (optional, defaults to internal) | internal |
+| **Database name** | Database name (required) | tpch |
+| **Username** | Username | root |
+| **Password** | Password | your_password |
+
+**Database Name Format Explanation:**
+
+- **Internal Tables**: Enter the database name directly, such as `tpch`. The
system will automatically use the `internal` catalog.
+- **External Tables/Data Lake**: Enter the Catalog configuration. If only
linking internal tables, this item is not required.
+
+### Configuration Steps
+
+1. Start Metabase and log in.
+
+2. Click the gear icon in the upper right corner and select **Admin Settings**.
+
+
+
+3. In the left-hand menu, select **Databases**, and click the **Add database**
button in the upper right corner.
+
+
+
+4. In the **Database type** dropdown menu, select **Apache Doris**.
+
+
+
+5. Fill in the connection information:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. Click **Save** to save the configuration.
+
+7. Metabase will automatically test the connection and synchronize database
metadata. If the connection is successful, a success message will be displayed.
+
+
+
+At this point, the data source configuration is complete! Next, we can build
visualizations in Metabase.
+
+## Building Visualizations in Metabase
+
+We choose TPC-H data as the data source. Refer to [this
document](../../benchmark/tpch) for instructions on building the Doris TPC-H
data source.
+
+Now that we have configured the Doris data source in Metabase, let's visualize
the data...
+
+Suppose we need to analyze the order amount growth curve over time for
different freight methods for cost analysis.
+
+### Creating a Question
+
+1. Click the **New +** button in the upper right corner of the homepage and
select **Question**.
+
+
+
+2. Select the data source:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### Building Custom Metrics Using SQL
+
+To calculate revenue, we need to use a custom SQL expression:
+
+1. Click the **view sql** switch in the upper right corner, then click
**convert this question to SQL** to edit the SQL.
+
+
+
+2. Enter the following SQL query:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. Click the **Visualize** button in the lower right corner to view the
results.
+
+
+
+
+### Configure Visualization Charts
+
+1. The default display is a table. Click the **Visualization** button in the
lower left corner and select the **Line** chart type.
+
+
+
+2. Configure chart parameters as needed (metabase automatically configures as
follows):
+ - **X-axis**: ship_month (shipping month)
+ - **Y-axis**: revenue (revenue)
+ - **Series**: l_shipmode (shipping mode)
+
+3. Customize chart style:
+ - Click the **Settings** icon to adjust colors, labels, legend position,
etc.
+ - In the **Display** tab, you can set axis titles, value formats, etc.
+
+4. After configuring the chart, click **Save** in the upper right corner.
+
+5. Enter the issue name: **my-tpch**, and select the collection to save to.
+
+
+
+### Creating a Dashboard
+
+1. Click **+ New** → **Dashboard** to create a new dashboard. Enter the
dashboard name: **my-tpch**
+
+
+
+2. Click **Add a chart** to add the saved question to the dashboard.
+
+
+
+3. Adjust the chart position and size, and click **Save** in the upper right
corner to save the dashboard.
+
+
+
+At this point, Metabase has been successfully connected to Apache Doris, and
data analysis and visualization dashboard creation have been implemented!
+
+## Advanced Features
+
+### Accessing External Data Using Catalogs
+
+Doris supports multi-catalog functionality, allowing queries to external data
sources and cross-data source queries. When using it in Metabase:
+
+1. Configure `Catalog` in the Links configuration interface, and configure the
external database under that catalog in `Database`, for example:
+ `catalog: hive_catalog`, `database: warehouse` - Access the warehouse
database named hive_catalog
+
+
+
+2. Or explicitly specify the Catalog in an SQL query:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### Using Parameterized Queries
+
+Metabase supports using variables in SQL queries, making it easy to create
interactive dashboards:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+After saving, data can be dynamically filtered in the dashboard using dropdown
menus or date pickers.
+
+### Performance Optimization Recommendations
+
+1. **Use Partition Clipping**: Add a partition column filter condition to the
WHERE clause.
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **Utilize Materialized Views:** For complex aggregation queries, creating
materialized views in Doris can accelerate the query process.
+
+3. **Control Result Set Size:** Use LIMIT to limit the number of rows
returned, avoiding loading too much data at once.
+
+4. **Query Caching:** Metabase automatically caches query results; setting
appropriate cache times can improve performance.
+
+### Connection and Usage Tips
+
+- **Driver Installation:** Ensure `doris.metabase-driver.jar` is placed in the
Metabase `plugins` directory and restart Metabase.
+- **Time Zone Settings:** If you encounter time zone issues, add
`serverTimezone=Asia/Shanghai` to the JDBC connection string.
+- **Partitioned Table Optimization:** Creating appropriate Doris partitioned
tables, dividing them by time and bucketing them, can effectively reduce the
amount of data scanned in queries.
+- **Network Connection:** It is recommended to use a VPC private connection to
avoid security risks introduced by public network access.
+- **Access Control:** Fine-tune Doris user account roles and access
permissions, following the principle of least privilege.
+- **Metadata Synchronization:** When Doris... When the table structure
changes, manually synchronize it by clicking "Sync database schema now" on the
Metabase management page.
+- **Performance Monitoring**: For slow queries, you can use `SHOW QUERY
PROFILE` in Doris to analyze performance bottlenecks.
+
+### Data Type Display Anomalies
+
+- Ensure you are using the latest version of the Doris Driver.
+- Doris largeint types need to be explicitly converted in SQL.
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
+
\ No newline at end of file
diff --git a/versioned_docs/version-3.x/ecosystem/bi/metabase.md
b/versioned_docs/version-3.x/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..b3bb143ff99
--- /dev/null
+++ b/versioned_docs/version-3.x/ecosystem/bi/metabase.md
@@ -0,0 +1,270 @@
+---
+{
+ "title": "Metabase",
+ "language": "en",
+ "description": "Metabase is an open-source business intelligence tool that
provides simple and easy-to-use data analysis and visualization capabilities,
supports rich data source connections, and enables the rapid construction of
interactive dashboards."
+}
+---
+
+Metabase is an open-source business intelligence tool that provides simple and
easy-to-use data analysis and visualization capabilities, supports rich data
source connections, and enables the rapid construction of interactive
dashboards. Its key features include a user-friendly interface, ease of use,
support for self-service analysis, visualization dashboard creation, data
drill-down exploration, and an integrated SQL query editor for SQL queries and
data export.
+
+The Metabase Apache Doris Driver allows Metabase to connect to Apache Doris
databases, enabling querying and visualization of both internal and external
Doris data.
+
+This driver allows Metabase to integrate Apache Doris databases and tables as
data sources. To enable this feature, follow the setup guide below:
+
+- Installing and configuring the driver
+- Configuring the Apache Doris data source in Metabase
+- Building visualizations in Metabase
+- Connection and usage tips
+
+## Installing Metabase and the Doris Driver
+
+### Prerequisites
+
+1. Download and install Metabase version 0.48.0 or later. See the [Metabase
Installation
Documentation](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
for details.
+2. Prepare the Apache Doris cluster.
+
+### Install the Doris Driver
+
+First, you need to download the latest
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar).
+
+Then install the driver. The installation method depends on your Metabase
deployment method:
+
+#### Metabase Standard Deployment
+
+1. Download the Driver
+
+2. Create the Metabase plugin directory (if it doesn't exist):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. Copy the JAR file to the plugin directory:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. Restart the Metabase service
+
+#### Metabase Docker Deployment
+
+If Metabase is started using Docker, it is recommended to start it by mounting
`doris.metabase-driver.jar`. The plugin path inside the Docker container is
`/plugins/`.
+
+1. Download the Driver
+
+2. Start Metabase using the following command:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## Configuring a Doris Data Source in Metabase
+
+Now that you have **Metabase** and **metabase-doris-driver** installed, let's
see how to define a data source in Metabase that connects to the tpch database
in Doris.
+
+### Connection Parameter Description
+
+The following parameters need to be configured when connecting to Apache Doris:
+
+| Parameters | Meaning | Example |
+|------|------|------|
+| **Display Name** | Data source display name | Doris-TPCH |
+| **Host** | Doris FE node address | 127.0.0.1 |
+| **Port** | Doris Query Port (MySQL protocol port) | 9030 |
+| **Catalog name** | Catalog name (optional, defaults to internal) | internal |
+| **Database name** | Database name (required) | tpch |
+| **Username** | Username | root |
+| **Password** | Password | your_password |
+
+**Database Name Format Explanation:**
+
+- **Internal Tables**: Enter the database name directly, such as `tpch`. The
system will automatically use the `internal` catalog.
+- **External Tables/Data Lake**: Enter the Catalog configuration. If only
linking internal tables, this item is not required.
+
+### Configuration Steps
+
+1. Start Metabase and log in.
+
+2. Click the gear icon in the upper right corner and select **Admin Settings**.
+
+
+
+3. In the left-hand menu, select **Databases**, and click the **Add database**
button in the upper right corner.
+
+
+
+4. In the **Database type** dropdown menu, select **Apache Doris**.
+
+
+
+5. Fill in the connection information:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. Click **Save** to save the configuration.
+
+7. Metabase will automatically test the connection and synchronize database
metadata. If the connection is successful, a success message will be displayed.
+
+
+
+At this point, the data source configuration is complete! Next, we can build
visualizations in Metabase.
+
+## Building Visualizations in Metabase
+
+We choose TPC-H data as the data source. Refer to [this
document](../../benchmark/tpch) for instructions on building the Doris TPC-H
data source.
+
+Now that we have configured the Doris data source in Metabase, let's visualize
the data...
+
+Suppose we need to analyze the order amount growth curve over time for
different freight methods for cost analysis.
+
+### Creating a Question
+
+1. Click the **New +** button in the upper right corner of the homepage and
select **Question**.
+
+
+
+2. Select the data source:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### Building Custom Metrics Using SQL
+
+To calculate revenue, we need to use a custom SQL expression:
+
+1. Click the **view sql** switch in the upper right corner, then click
**convert this question to SQL** to edit the SQL.
+
+
+
+2. Enter the following SQL query:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. Click the **Visualize** button in the lower right corner to view the
results.
+
+
+
+
+### Configure Visualization Charts
+
+1. The default display is a table. Click the **Visualization** button in the
lower left corner and select the **Line** chart type.
+
+
+
+2. Configure chart parameters as needed (metabase automatically configures as
follows):
+ - **X-axis**: ship_month (shipping month)
+ - **Y-axis**: revenue (revenue)
+ - **Series**: l_shipmode (shipping mode)
+
+3. Customize chart style:
+ - Click the **Settings** icon to adjust colors, labels, legend position,
etc.
+ - In the **Display** tab, you can set axis titles, value formats, etc.
+
+4. After configuring the chart, click **Save** in the upper right corner.
+
+5. Enter the issue name: **my-tpch**, and select the collection to save to.
+
+
+
+### Creating a Dashboard
+
+1. Click **+ New** → **Dashboard** to create a new dashboard. Enter the
dashboard name: **my-tpch**
+
+
+
+2. Click **Add a chart** to add the saved question to the dashboard.
+
+
+
+3. Adjust the chart position and size, and click **Save** in the upper right
corner to save the dashboard.
+
+
+
+At this point, Metabase has been successfully connected to Apache Doris, and
data analysis and visualization dashboard creation have been implemented!
+
+## Advanced Features
+
+### Accessing External Data Using Catalogs
+
+Doris supports multi-catalog functionality, allowing queries to external data
sources and cross-data source queries. When using it in Metabase:
+
+1. Configure `Catalog` in the Links configuration interface, and configure the
external database under that catalog in `Database`, for example:
+ `catalog: hive_catalog`, `database: warehouse` - Access the warehouse
database named hive_catalog
+
+
+
+2. Or explicitly specify the Catalog in an SQL query:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### Using Parameterized Queries
+
+Metabase supports using variables in SQL queries, making it easy to create
interactive dashboards:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+After saving, data can be dynamically filtered in the dashboard using dropdown
menus or date pickers.
+
+### Performance Optimization Recommendations
+
+1. **Use Partition Clipping**: Add a partition column filter condition to the
WHERE clause.
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **Utilize Materialized Views:** For complex aggregation queries, creating
materialized views in Doris can accelerate the query process.
+
+3. **Control Result Set Size:** Use LIMIT to limit the number of rows
returned, avoiding loading too much data at once.
+
+4. **Query Caching:** Metabase automatically caches query results; setting
appropriate cache times can improve performance.
+
+### Connection and Usage Tips
+
+- **Driver Installation:** Ensure `doris.metabase-driver.jar` is placed in the
Metabase `plugins` directory and restart Metabase.
+- **Time Zone Settings:** If you encounter time zone issues, add
`serverTimezone=Asia/Shanghai` to the JDBC connection string.
+- **Partitioned Table Optimization:** Creating appropriate Doris partitioned
tables, dividing them by time and bucketing them, can effectively reduce the
amount of data scanned in queries.
+- **Network Connection:** It is recommended to use a VPC private connection to
avoid security risks introduced by public network access.
+- **Access Control:** Fine-tune Doris user account roles and access
permissions, following the principle of least privilege.
+- **Metadata Synchronization:** When Doris... When the table structure
changes, manually synchronize it by clicking "Sync database schema now" on the
Metabase management page.
+- **Performance Monitoring**: For slow queries, you can use `SHOW QUERY
PROFILE` in Doris to analyze performance bottlenecks.
+
+### Data Type Display Anomalies
+
+- Ensure you are using the latest version of the Doris Driver.
+- Doris largeint types need to be explicitly converted in SQL.
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
+
\ No newline at end of file
diff --git a/versioned_docs/version-4.x/ecosystem/bi/metabase.md
b/versioned_docs/version-4.x/ecosystem/bi/metabase.md
new file mode 100644
index 00000000000..0ed8d26525e
--- /dev/null
+++ b/versioned_docs/version-4.x/ecosystem/bi/metabase.md
@@ -0,0 +1,270 @@
+---
+{
+ "title": "Metabase",
+ "language": "en",
+ "description": "Metabase is an open-source business intelligence tool that
provides simple and easy-to-use data analysis and visualization capabilities,
supports rich data source connections, and enables the rapid construction of
interactive dashboards."
+}
+---
+
+Metabase is an open-source business intelligence tool that provides simple and
easy-to-use data analysis and visualization capabilities, supports rich data
source connections, and enables the rapid construction of interactive
dashboards. Its key features include a user-friendly interface, ease of use,
support for self-service analysis, visualization dashboard creation, data
drill-down exploration, and an integrated SQL query editor for SQL queries and
data export.
+
+The Metabase Apache Doris Driver allows Metabase to connect to Apache Doris
databases, enabling querying and visualization of both internal and external
Doris data.
+
+This driver allows Metabase to integrate Apache Doris databases and tables as
data sources. To enable this feature, follow the setup guide below:
+
+- Installing and configuring the driver
+- Configuring the Apache Doris data source in Metabase
+- Building visualizations in Metabase
+- Connection and usage tips
+
+## Installing Metabase and the Doris Driver
+
+### Prerequisites
+
+1. Download and install Metabase version 0.48.0 or later. See the [Metabase
Installation
Documentation](https://www.metabase.com/docs/latest/installation-and-operation/installing-metabase)
for details.
+2. Prepare the Apache Doris cluster.
+
+### Install the Doris Driver
+
+First, you need to download the latest
[metabase-doris-driver](https://velodb-bi-connector-1316291683.cos.ap-hongkong.myqcloud.com/Metabase/latest/doris.metabase-driver.jar).
+
+Then install the driver. The installation method depends on your Metabase
deployment method:
+
+#### Metabase Standard Deployment
+
+1. Download the Driver
+
+2. Create the Metabase plugin directory (if it doesn't exist):
+
+```bash
+mkdir -p $path_metabase/plugins
+```
+
+3. Copy the JAR file to the plugin directory:
+
+```bash
+cp doris.metabase-driver.jar $path_metabase/plugins
+```
+
+4. Restart the Metabase service
+
+#### Metabase Docker Deployment
+
+If Metabase is started using Docker, it is recommended to start it by mounting
`doris.metabase-driver.jar`. The plugin path inside the Docker container is
`/plugins/`.
+
+1. Download the Driver
+
+2. Start Metabase using the following command:
+
+```bash
+docker run -d -p 3000:3000 --name metabase -v
$host_path/doris.metabase-driver.jar:/plugins/doris.metabase-driver.jar
metabase/metabase
+```
+
+## Configuring a Doris Data Source in Metabase
+
+Now that you have **Metabase** and **metabase-doris-driver** installed, let's
see how to define a data source in Metabase that connects to the tpch database
in Doris.
+
+### Connection Parameter Description
+
+The following parameters need to be configured when connecting to Apache Doris:
+
+| Parameters | Meaning | Example |
+|------|------|------|
+| **Display Name** | Data source display name | Doris-TPCH |
+| **Host** | Doris FE node address | 127.0.0.1 |
+| **Port** | Doris Query Port (MySQL protocol port) | 9030 |
+| **Catalog name** | Catalog name (optional, defaults to internal) | internal |
+| **Database name** | Database name (required) | tpch |
+| **Username** | Username | root |
+| **Password** | Password | your_password |
+
+**Database Name Format Explanation:**
+
+- **Internal Tables**: Enter the database name directly, such as `tpch`. The
system will automatically use the `internal` catalog.
+- **External Tables/Data Lake**: Enter the Catalog configuration. If only
linking internal tables, this item is not required.
+
+### Configuration Steps
+
+1. Start Metabase and log in.
+
+2. Click the gear icon in the upper right corner and select **Admin Settings**.
+
+
+
+3. In the left-hand menu, select **Databases**, and click the **Add database**
button in the upper right corner.
+
+
+
+4. In the **Database type** dropdown menu, select **Apache Doris**.
+
+
+
+5. Fill in the connection information:
+
+- **Display name**: Doris-TPCH
+- **Host**: 127.0.0.1
+- **Port**: 9030
+- **Database name**: tpch
+- **Username**: admin
+- **Password**: ******
+
+
+
+6. Click **Save** to save the configuration.
+
+7. Metabase will automatically test the connection and synchronize database
metadata. If the connection is successful, a success message will be displayed.
+
+
+
+At this point, the data source configuration is complete! Next, we can build
visualizations in Metabase.
+
+## Building Visualizations in Metabase
+
+We choose TPC-H data as the data source. Refer to [this
document](../../benchmark/tpch) for instructions on building the Doris TPC-H
data source.
+
+Now that we have configured the Doris data source in Metabase, let's visualize
the data...
+
+Suppose we need to analyze the order amount growth curve over time for
different freight methods for cost analysis.
+
+### Creating a Question
+
+1. Click the **New +** button in the upper right corner of the homepage and
select **Question**.
+
+
+
+2. Select the data source:
+ - **Database**: Doris TPCH
+ - **Table**: lineitem
+
+
+
+### Building Custom Metrics Using SQL
+
+To calculate revenue, we need to use a custom SQL expression:
+
+1. Click the **view sql** switch in the upper right corner, then click
**convert this question to SQL** to edit the SQL.
+
+
+
+2. Enter the following SQL query:
+
+```sql
+SELECT
+ DATE_FORMAT(l_shipdate, '%Y-%m') AS ship_month,
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate >= '1995-01-01'
+ AND l_shipdate < '1997-01-01'
+GROUP BY
+ DATE_FORMAT(l_shipdate, '%Y-%m'),
+ l_shipmode
+ORDER BY ship_month, l_shipmode
+```
+
+3. Click the **Visualize** button in the lower right corner to view the
results.
+
+
+
+
+### Configure Visualization Charts
+
+1. The default display is a table. Click the **Visualization** button in the
lower left corner and select the **Line** chart type.
+
+
+
+2. Configure chart parameters as needed (metabase automatically configures as
follows):
+ - **X-axis**: ship_month (shipping month)
+ - **Y-axis**: revenue (revenue)
+ - **Series**: l_shipmode (shipping mode)
+
+3. Customize chart style:
+ - Click the **Settings** icon to adjust colors, labels, legend position,
etc.
+ - In the **Display** tab, you can set axis titles, value formats, etc.
+
+4. After configuring the chart, click **Save** in the upper right corner.
+
+5. Enter the issue name: **my-tpch**, and select the collection to save to.
+
+
+
+### Creating a Dashboard
+
+1. Click **+ New** → **Dashboard** to create a new dashboard. Enter the
dashboard name: **my-tpch**
+
+
+
+2. Click **Add a chart** to add the saved question to the dashboard.
+
+
+
+3. Adjust the chart position and size, and click **Save** in the upper right
corner to save the dashboard.
+
+
+
+At this point, Metabase has been successfully connected to Apache Doris, and
data analysis and visualization dashboard creation have been implemented!
+
+## Advanced Features
+
+### Accessing External Data Using Catalogs
+
+Doris supports multi-catalog functionality, allowing queries to external data
sources and cross-data source queries. When using it in Metabase:
+
+1. Configure `Catalog` in the Links configuration interface, and configure the
external database under that catalog in `Database`, for example:
+ `catalog: hive_catalog`, `database: warehouse` - Access the warehouse
database named hive_catalog
+
+
+
+2. Or explicitly specify the Catalog in an SQL query:
+
+```sql
+SELECT * FROM hive.warehouse.orders LIMIT 100;
+```
+
+### Using Parameterized Queries
+
+Metabase supports using variables in SQL queries, making it easy to create
interactive dashboards:
+
+```sql
+SELECT
+ l_shipmode,
+ SUM(l_extendedprice * (1 - l_discount)) AS revenue
+FROM lineitem
+WHERE l_shipdate BETWEEN {{start_date}} AND {{end_date}}
+ AND l_shipmode = {{ship_mode}}
+GROUP BY l_shipmode
+```
+
+After saving, data can be dynamically filtered in the dashboard using dropdown
menus or date pickers.
+
+### Performance Optimization Recommendations
+
+1. **Use Partition Clipping**: Add a partition column filter condition to the
WHERE clause.
+ ```sql
+ WHERE date >= '2024-01-01' AND date < '2024-02-01'
+ ```
+
+2. **Utilize Materialized Views:** For complex aggregation queries, creating
materialized views in Doris can accelerate the query process.
+
+3. **Control Result Set Size:** Use LIMIT to limit the number of rows
returned, avoiding loading too much data at once.
+
+4. **Query Caching:** Metabase automatically caches query results; setting
appropriate cache times can improve performance.
+
+### Connection and Usage Tips
+
+- **Driver Installation:** Ensure `doris.metabase-driver.jar` is placed in the
Metabase `plugins` directory and restart Metabase.
+- **Time Zone Settings:** If you encounter time zone issues, add
`serverTimezone=Asia/Shanghai` to the JDBC connection string.
+- **Partitioned Table Optimization:** Creating appropriate Doris partitioned
tables, dividing them by time and bucketing them, can effectively reduce the
amount of data scanned in queries.
+- **Network Connection:** It is recommended to use a VPC private connection to
avoid security risks introduced by public network access.
+- **Access Control:** Fine-tune Doris user account roles and access
permissions, following the principle of least privilege.
+- **Metadata Synchronization:** When Doris... When the table structure
changes, manually synchronize it by clicking "Sync database schema now" on the
Metabase management page.
+- **Performance Monitoring**: For slow queries, you can use `SHOW QUERY
PROFILE` in Doris to analyze performance bottlenecks.
+
+### Data Type Display Anomalies
+
+- Ensure you are using the latest version of the Doris Driver.
+- Doris largeint types need to be explicitly converted in SQL.
+ ```sql
+ SELECT CAST(large_int_col AS STRING) FROM table
+ ```
+
\ No newline at end of file
diff --git a/versioned_sidebars/version-2.1-sidebars.json
b/versioned_sidebars/version-2.1-sidebars.json
index 18f69becac7..be670f5f994 100644
--- a/versioned_sidebars/version-2.1-sidebars.json
+++ b/versioned_sidebars/version-2.1-sidebars.json
@@ -860,6 +860,7 @@
"items": [
"ecosystem/bi/apache-superset",
"ecosystem/bi/finebi",
+ "ecosystem/bi/metabase",
"ecosystem/bi/powerbi",
"ecosystem/bi/tableau",
"ecosystem/bi/quicksight",
diff --git a/versioned_sidebars/version-3.x-sidebars.json
b/versioned_sidebars/version-3.x-sidebars.json
index 03e7baaea4c..47936966f27 100644
--- a/versioned_sidebars/version-3.x-sidebars.json
+++ b/versioned_sidebars/version-3.x-sidebars.json
@@ -932,6 +932,7 @@
"items": [
"ecosystem/bi/apache-superset",
"ecosystem/bi/finebi",
+ "ecosystem/bi/metabase",
"ecosystem/bi/powerbi",
"ecosystem/bi/tableau",
"ecosystem/bi/quicksight",
diff --git a/versioned_sidebars/version-4.x-sidebars.json
b/versioned_sidebars/version-4.x-sidebars.json
index 5f1426eae6a..33f6c724640 100644
--- a/versioned_sidebars/version-4.x-sidebars.json
+++ b/versioned_sidebars/version-4.x-sidebars.json
@@ -989,6 +989,7 @@
"items": [
"ecosystem/bi/apache-superset",
"ecosystem/bi/finebi",
+ "ecosystem/bi/metabase",
"ecosystem/bi/powerbi",
"ecosystem/bi/tableau",
"ecosystem/bi/quicksight",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]