diff --git a/docs/connection-integration/data-integration/intro.mdx b/docs/connection-integration/data-integration/intro.mdx index c024a0cc0396a..cce7454c4e1d1 100644 --- a/docs/connection-integration/data-integration/intro.mdx +++ b/docs/connection-integration/data-integration/intro.mdx @@ -95,6 +95,13 @@ Apache Doris supports integration with a wide range of data ecosystem tools. You description="Manage Doris data sources with CloudDM, with support for queries, visual editing, access control, and database CI/CD" link="./clouddm" /> + + ## Data Migration, Synchronization, and Bulk Loading diff --git a/docs/connection-integration/data-integration/libredb-studio.md b/docs/connection-integration/data-integration/libredb-studio.md new file mode 100644 index 0000000000000..47f150661a7da --- /dev/null +++ b/docs/connection-integration/data-integration/libredb-studio.md @@ -0,0 +1,101 @@ +--- +{ + "title": "LibreDB Studio", + "language": "en", + "description": "Connect LibreDB Studio to Apache Doris over the MySQL wire protocol to browse schemas, run queries, and monitor a cluster, with the current gaps stated plainly." +} +--- + + + + +## Overview + +[LibreDB Studio](https://libredb.org) is an open source (MIT licensed) SQL IDE that runs in a +browser instead of installing as a desktop application. It ships as a Docker image, a Helm chart, +or an npm package, and connects to Apache Doris over the MySQL wire protocol using its MySQL +connection type, since there is no separate Doris driver. + +After reading this article, you can do the following: + +- Run LibreDB Studio and create a Doris connection using its MySQL connection type. +- Browse internal-catalog databases and tables, and run SQL against Doris. +- Know which readings Doris does not publish, and why, before you rely on a panel. + +## Prerequisites + + + + +- LibreDB Studio is running. The quickest way is Docker: + +```sh +docker run -p 3000:3000 ghcr.io/libredb/libredb-studio:latest +``` + + A Helm chart and an npm package (`npx @libredb/studio`) are also available; see the + [LibreDB Studio repository](https://github.com/libredb/libredb-studio) for details. +- Doris cluster connection information is ready: the FE host address, the FE MySQL protocol port + (default `9030`), a target database, a username, and a password. + +## Connect to Doris + + + + +### 1. Add a connection + +Open LibreDB Studio in your browser, sign in, and click the **+** button to add a new connection. + +![Add a connection](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png) + +### 2. Configure the Doris connection + +Select **MySQL** as the connection type (Doris speaks the MySQL wire protocol, so there is no +separate Doris entry in the connection type list), and fill in: + +| Field | Description | +| --- | --- | +| Host | The FE host address of the Doris cluster. | +| Port | The FE MySQL protocol port, `9030` by default (not MySQL's `3306`). | +| Database | The target database in the Doris cluster's internal catalog. | +| User | The username for the Doris cluster. | +| Password | The password for the Doris cluster. | + +![Configure the connection](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png) + +### 3. Test and establish the connection + +Click **Test Connection** to verify, then **Establish Connection** to save it. Test Connection +reports `Connected successfully`, one click of Establish Connection stores the connection, and the +header badge reads **Online**. + +![Connection established](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png) + +### 4. Browse and query + +Expand the connection in the object browser to see Doris databases and tables, and use the SQL +editor to run queries against the internal catalog. + +![Browse and query Doris](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png) + +## Known limitations + +Apache Doris is a fork target for the MySQL connection type rather than a connection type of its +own, so LibreDB Studio reaches it through the same code path as MySQL, MariaDB, and TiDB. Most of +the product works unchanged; the gaps below are the ones worth knowing before you rely on a panel: + +| Area | Status | Detail | +| --- | --- | --- | +| Row counts and byte sizes | Correct | Matched Doris's own `SHOW DATA` output exactly once Doris's background statistics settled, for both row count and byte size. | +| Query cancel | Correct | A `SELECT sleep(8)` was genuinely cancelled; LibreDB Studio reported "Query Cancelled: Query execution was cancelled." | +| Permission errors | Correct | A role granted `SELECT_PRIV` on one table only saw that table in the object browser, and querying the other table returned Doris's own error text, with the specific role, database, table and column names replaced here by placeholders: `Permission denied: user ['role'@'%'] does not have privilege for [...] command on [internal].[db].[table].[column]`. | +| Overview and Health panels | Publish absences | Both answer. The overview shows the real build, read from `@@version_comment` rather than from `version()`, which reports the MySQL version Doris advertises. Doris answers a bare `SHOW STATUS` with zero rows and publishes no `max_connections` variable, so server uptime and the connection count read `N/A, not published` rather than `0`. | +| Index list | Never populated | `information_schema.statistics` is empty on Doris, so no table ever shows an index. | +| Foreign keys | Invisible and unenforced | Accepted by `ALTER TABLE ... ADD CONSTRAINT` and listed by `SHOW CONSTRAINTS`, but absent from `information_schema.KEY_COLUMN_USAGE`, so the schema browser shows no relationship, and Doris itself does not enforce the constraint (a row referencing a nonexistent parent key inserts without error). | +| Explain | Correct | The Explain button returns Doris's own Nereids plan. `EXPLAIN FORMAT='json'` is a parse error on Doris (`mismatched input '='`), so LibreDB Studio sends a plain `EXPLAIN` to this engine instead. | +| Maintenance actions | Partial | `Analyze` runs; `Optimize` and `Check` are not statements in Doris's grammar at all and are rejected as a parse error. | +| Freshly loaded tables | Temporarily zero | A table read 0 rows and 0 B immediately after a 2000-row load, and the true count appeared roughly a minute later once Doris's background statistics caught up. This is Doris's own lag, not a stale connection. | + +For more on using LibreDB Studio, see the +[LibreDB Studio repository](https://github.com/libredb/libredb-studio). diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/intro.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/intro.mdx index 11a98a1118ab1..85cab1d3848ac 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/intro.mdx +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/intro.mdx @@ -95,6 +95,13 @@ Apache Doris 支持与多类数据生态工具集成。您可以按照使用场 description="使用 CloudDM 管理 Doris 数据源,支持查询、可视化编辑、权限管控和数据库 CI/CD" link="./clouddm" /> + + ## 数据迁移、同步与批量导入 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/libredb-studio.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/libredb-studio.md new file mode 100644 index 0000000000000..f6dcf525d9280 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/connection-integration/data-integration/libredb-studio.md @@ -0,0 +1,89 @@ +--- +{ + "title": "LibreDB Studio", + "language": "zh-CN", + "description": "通过 MySQL 协议将 LibreDB Studio 连接到 Apache Doris,浏览表结构、执行查询并监控集群,同时如实说明当前存在的限制。" +} +--- + + + + +## 概述 + +[LibreDB Studio](https://libredb.org) 是一款开源(MIT 许可)的 SQL IDE,在浏览器中运行,无需安装桌面客户端。它提供 Docker 镜像、Helm Chart 和 npm 包三种形式,并通过 MySQL 协议连接 Apache Doris(使用其 MySQL 连接类型,因为 LibreDB Studio 没有单独的 Doris 驱动)。 + +阅读本文后,你可以完成以下任务: + +- 运行 LibreDB Studio,并使用 MySQL 连接类型创建一个 Doris 连接。 +- 浏览 internal catalog 中的数据库和表,并对 Doris 执行 SQL 查询。 +- 了解 Doris 未提供哪些指标,以及原因,避免在使用前产生误判。 + +## 使用前准备 + + + + +- LibreDB Studio 已启动运行。最快的方式是使用 Docker: + +```sh +docker run -p 3000:3000 ghcr.io/libredb/libredb-studio:latest +``` + + 此外还提供 Helm Chart 和 npm 包(`npx @libredb/studio`),详见 [LibreDB Studio 仓库](https://github.com/libredb/libredb-studio)。 +- 已准备好 Doris 集群的连接信息:FE 主机地址、FE 的 MySQL 协议端口(默认 `9030`)、目标数据库、用户名和密码。 + +## 连接 Doris + + + + +### 1. 新增连接 + +在浏览器中打开 LibreDB Studio,登录后点击 **+** 按钮新增一个连接。 + +![新增连接](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png) + +### 2. 配置 Doris 连接 + +连接类型选择 **MySQL**(Doris 使用 MySQL 协议通信,连接类型列表中没有单独的 Doris 选项),并填写以下信息: + +| 字段 | 说明 | +| --- | --- | +| Host | Doris 集群的 FE 主机地址。 | +| Port | FE 的 MySQL 协议端口,默认为 `9030`(不是 MySQL 默认的 `3306`)。 | +| Database | Doris 集群 internal catalog 中的目标数据库。 | +| User | Doris 集群的用户名。 | +| Password | Doris 集群的密码。 | + +![配置连接](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png) + +### 3. 测试并建立连接 + +点击 **Test Connection** 进行验证,再点击 **Establish Connection** 保存连接。Test Connection 会提示 `Connected successfully`,点击一次 **Establish Connection** 即可保存该连接,保存后顶部状态标识显示为 **Online**。 + +![连接已建立](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png) + +### 4. 浏览与查询 + +在对象浏览器中展开该连接,即可查看 Doris 的数据库和表,并使用 SQL 编辑器对 internal catalog 执行查询。 + +![浏览并查询 Doris](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png) + +## 已知限制 + +Apache Doris 在 LibreDB Studio 中是作为 MySQL 连接类型的一个兼容目标,而不是独立的连接类型,因此 LibreDB Studio 通过与 MySQL、MariaDB、TiDB 相同的代码路径访问 Doris。产品的大部分功能可以正常使用,以下是使用前需要了解的差异点: + +| 方面 | 状态 | 详情 | +| --- | --- | --- | +| 行数与字节大小 | 正确 | 在 Doris 后台统计信息更新完成后,行数和字节大小都与 Doris 自身 `SHOW DATA` 的输出完全一致。 | +| 查询取消 | 正确 | 执行 `SELECT sleep(8)` 后真正被取消;LibreDB Studio 提示 “Query Cancelled - Query execution was cancelled.”。 | +| 权限错误 | 正确 | 一个仅被授予某张表 `SELECT_PRIV` 权限的角色,在对象浏览器中只能看到该表;查询另一张表时返回了 Doris 原始的错误文本,这里将实际的角色、数据库、表和列名替换为占位符:`Permission denied: user ['role'@'%'] does not have privilege for [...] command on [internal].[db].[table].[column]`。 | +| 概览与健康检查面板 | 显示信息缺失 | 两个面板都能正常返回。概览面板显示的是真实版本,取自 `@@version_comment`,而不是 `version()`(后者返回的是 Doris 对外声明的 MySQL 版本)。Doris 对不带条件的 `SHOW STATUS` 返回零行,也不提供 `max_connections` 变量,因此服务器运行时长与连接数显示为 `N/A, not published`,而不是 `0`。 | +| 索引列表 | 始终为空 | Doris 上 `information_schema.statistics` 为空,因此任何表都不会显示索引。 | +| 外键 | 不可见且不生效 | `ALTER TABLE ... ADD CONSTRAINT` 可以成功执行,`SHOW CONSTRAINTS` 中也能看到,但 `information_schema.KEY_COLUMN_USAGE` 中没有对应记录。因此表结构浏览器中看不到这层关系,Doris 本身也不会真正约束这个外键(插入一条引用不存在父键的记录不会报错)。 | +| Explain | 正确 | Explain 按钮会返回 Doris 自身的 Nereids 执行计划。`EXPLAIN FORMAT='json'` 在 Doris 上会导致解析错误(`mismatched input '='`),因此 LibreDB Studio 针对该引擎发送的是普通的 `EXPLAIN`。 | +| 维护类操作 | 部分支持 | `Analyze` 可以正常执行;`Optimize` 和 `Check` 在 Doris 的语法中完全不存在,会被当作解析错误拒绝。 | +| 刚加载完成的表 | 短暂显示为 0 | 一张表在加载 2000 行数据后立即查询显示为 0 行、0 B,大约一分钟后,随着 Doris 后台统计信息追上进度,真实数值才会显示出来,这是 Doris 自身的延迟,并不是连接过期或出错。 | + +关于 LibreDB Studio 的更多用法,请参见 [LibreDB Studio 仓库](https://github.com/libredb/libredb-studio)。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/intro.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/intro.mdx index a81f17aaebbd3..1e7e805daa1e2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/intro.mdx +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/intro.mdx @@ -95,6 +95,13 @@ Apache Doris 支持与多类数据生态工具集成。您可以按照使用场 description="使用 CloudDM 管理 Doris 数据源,支持查询、可视化编辑、权限管控和数据库 CI/CD" link="./clouddm" /> + + ## 数据迁移、同步与批量导入 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/libredb-studio.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/libredb-studio.md new file mode 100644 index 0000000000000..f6dcf525d9280 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/connection-integration/data-integration/libredb-studio.md @@ -0,0 +1,89 @@ +--- +{ + "title": "LibreDB Studio", + "language": "zh-CN", + "description": "通过 MySQL 协议将 LibreDB Studio 连接到 Apache Doris,浏览表结构、执行查询并监控集群,同时如实说明当前存在的限制。" +} +--- + + + + +## 概述 + +[LibreDB Studio](https://libredb.org) 是一款开源(MIT 许可)的 SQL IDE,在浏览器中运行,无需安装桌面客户端。它提供 Docker 镜像、Helm Chart 和 npm 包三种形式,并通过 MySQL 协议连接 Apache Doris(使用其 MySQL 连接类型,因为 LibreDB Studio 没有单独的 Doris 驱动)。 + +阅读本文后,你可以完成以下任务: + +- 运行 LibreDB Studio,并使用 MySQL 连接类型创建一个 Doris 连接。 +- 浏览 internal catalog 中的数据库和表,并对 Doris 执行 SQL 查询。 +- 了解 Doris 未提供哪些指标,以及原因,避免在使用前产生误判。 + +## 使用前准备 + + + + +- LibreDB Studio 已启动运行。最快的方式是使用 Docker: + +```sh +docker run -p 3000:3000 ghcr.io/libredb/libredb-studio:latest +``` + + 此外还提供 Helm Chart 和 npm 包(`npx @libredb/studio`),详见 [LibreDB Studio 仓库](https://github.com/libredb/libredb-studio)。 +- 已准备好 Doris 集群的连接信息:FE 主机地址、FE 的 MySQL 协议端口(默认 `9030`)、目标数据库、用户名和密码。 + +## 连接 Doris + + + + +### 1. 新增连接 + +在浏览器中打开 LibreDB Studio,登录后点击 **+** 按钮新增一个连接。 + +![新增连接](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png) + +### 2. 配置 Doris 连接 + +连接类型选择 **MySQL**(Doris 使用 MySQL 协议通信,连接类型列表中没有单独的 Doris 选项),并填写以下信息: + +| 字段 | 说明 | +| --- | --- | +| Host | Doris 集群的 FE 主机地址。 | +| Port | FE 的 MySQL 协议端口,默认为 `9030`(不是 MySQL 默认的 `3306`)。 | +| Database | Doris 集群 internal catalog 中的目标数据库。 | +| User | Doris 集群的用户名。 | +| Password | Doris 集群的密码。 | + +![配置连接](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png) + +### 3. 测试并建立连接 + +点击 **Test Connection** 进行验证,再点击 **Establish Connection** 保存连接。Test Connection 会提示 `Connected successfully`,点击一次 **Establish Connection** 即可保存该连接,保存后顶部状态标识显示为 **Online**。 + +![连接已建立](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png) + +### 4. 浏览与查询 + +在对象浏览器中展开该连接,即可查看 Doris 的数据库和表,并使用 SQL 编辑器对 internal catalog 执行查询。 + +![浏览并查询 Doris](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png) + +## 已知限制 + +Apache Doris 在 LibreDB Studio 中是作为 MySQL 连接类型的一个兼容目标,而不是独立的连接类型,因此 LibreDB Studio 通过与 MySQL、MariaDB、TiDB 相同的代码路径访问 Doris。产品的大部分功能可以正常使用,以下是使用前需要了解的差异点: + +| 方面 | 状态 | 详情 | +| --- | --- | --- | +| 行数与字节大小 | 正确 | 在 Doris 后台统计信息更新完成后,行数和字节大小都与 Doris 自身 `SHOW DATA` 的输出完全一致。 | +| 查询取消 | 正确 | 执行 `SELECT sleep(8)` 后真正被取消;LibreDB Studio 提示 “Query Cancelled - Query execution was cancelled.”。 | +| 权限错误 | 正确 | 一个仅被授予某张表 `SELECT_PRIV` 权限的角色,在对象浏览器中只能看到该表;查询另一张表时返回了 Doris 原始的错误文本,这里将实际的角色、数据库、表和列名替换为占位符:`Permission denied: user ['role'@'%'] does not have privilege for [...] command on [internal].[db].[table].[column]`。 | +| 概览与健康检查面板 | 显示信息缺失 | 两个面板都能正常返回。概览面板显示的是真实版本,取自 `@@version_comment`,而不是 `version()`(后者返回的是 Doris 对外声明的 MySQL 版本)。Doris 对不带条件的 `SHOW STATUS` 返回零行,也不提供 `max_connections` 变量,因此服务器运行时长与连接数显示为 `N/A, not published`,而不是 `0`。 | +| 索引列表 | 始终为空 | Doris 上 `information_schema.statistics` 为空,因此任何表都不会显示索引。 | +| 外键 | 不可见且不生效 | `ALTER TABLE ... ADD CONSTRAINT` 可以成功执行,`SHOW CONSTRAINTS` 中也能看到,但 `information_schema.KEY_COLUMN_USAGE` 中没有对应记录。因此表结构浏览器中看不到这层关系,Doris 本身也不会真正约束这个外键(插入一条引用不存在父键的记录不会报错)。 | +| Explain | 正确 | Explain 按钮会返回 Doris 自身的 Nereids 执行计划。`EXPLAIN FORMAT='json'` 在 Doris 上会导致解析错误(`mismatched input '='`),因此 LibreDB Studio 针对该引擎发送的是普通的 `EXPLAIN`。 | +| 维护类操作 | 部分支持 | `Analyze` 可以正常执行;`Optimize` 和 `Check` 在 Doris 的语法中完全不存在,会被当作解析错误拒绝。 | +| 刚加载完成的表 | 短暂显示为 0 | 一张表在加载 2000 行数据后立即查询显示为 0 行、0 B,大约一分钟后,随着 Doris 后台统计信息追上进度,真实数值才会显示出来,这是 Doris 自身的延迟,并不是连接过期或出错。 | + +关于 LibreDB Studio 的更多用法,请参见 [LibreDB Studio 仓库](https://github.com/libredb/libredb-studio)。 diff --git a/sidebars.ts b/sidebars.ts index 398e430eeacf8..c889b4c67e5f7 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -190,6 +190,7 @@ const sidebars: SidebarsConfig = { 'connection-integration/data-integration/kettle', 'connection-integration/data-integration/kyuubi', 'connection-integration/data-integration/langfuse', + 'connection-integration/data-integration/libredb-studio', 'connection-integration/data-integration/logstash', 'connection-integration/data-integration/loongcollector', 'connection-integration/data-integration/metabase', diff --git a/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png new file mode 100644 index 0000000000000..80f8d4f26946b Binary files /dev/null and b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png differ diff --git a/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png new file mode 100644 index 0000000000000..7b2bdf61aa6e9 Binary files /dev/null and b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png differ diff --git a/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png new file mode 100644 index 0000000000000..017073528825b Binary files /dev/null and b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png differ diff --git a/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png new file mode 100644 index 0000000000000..94557961ffa45 Binary files /dev/null and b/static/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png differ diff --git a/static/images/next/connection-integration/data-integration/logos/libredb-studio.svg b/static/images/next/connection-integration/data-integration/logos/libredb-studio.svg new file mode 100644 index 0000000000000..c36a98eb18ba6 --- /dev/null +++ b/static/images/next/connection-integration/data-integration/logos/libredb-studio.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/versioned_docs/version-4.x/connection-integration/data-integration/intro.mdx b/versioned_docs/version-4.x/connection-integration/data-integration/intro.mdx index d2e2bf448e388..4fbb066b79950 100644 --- a/versioned_docs/version-4.x/connection-integration/data-integration/intro.mdx +++ b/versioned_docs/version-4.x/connection-integration/data-integration/intro.mdx @@ -95,6 +95,13 @@ Apache Doris supports integration with a wide range of data ecosystem tools. You description="Manage Doris data sources with CloudDM, with support for queries, visual editing, access control, and database CI/CD" link="./clouddm" /> + + ## Data Migration, Synchronization, and Bulk Loading diff --git a/versioned_docs/version-4.x/connection-integration/data-integration/libredb-studio.md b/versioned_docs/version-4.x/connection-integration/data-integration/libredb-studio.md new file mode 100644 index 0000000000000..47f150661a7da --- /dev/null +++ b/versioned_docs/version-4.x/connection-integration/data-integration/libredb-studio.md @@ -0,0 +1,101 @@ +--- +{ + "title": "LibreDB Studio", + "language": "en", + "description": "Connect LibreDB Studio to Apache Doris over the MySQL wire protocol to browse schemas, run queries, and monitor a cluster, with the current gaps stated plainly." +} +--- + + + + +## Overview + +[LibreDB Studio](https://libredb.org) is an open source (MIT licensed) SQL IDE that runs in a +browser instead of installing as a desktop application. It ships as a Docker image, a Helm chart, +or an npm package, and connects to Apache Doris over the MySQL wire protocol using its MySQL +connection type, since there is no separate Doris driver. + +After reading this article, you can do the following: + +- Run LibreDB Studio and create a Doris connection using its MySQL connection type. +- Browse internal-catalog databases and tables, and run SQL against Doris. +- Know which readings Doris does not publish, and why, before you rely on a panel. + +## Prerequisites + + + + +- LibreDB Studio is running. The quickest way is Docker: + +```sh +docker run -p 3000:3000 ghcr.io/libredb/libredb-studio:latest +``` + + A Helm chart and an npm package (`npx @libredb/studio`) are also available; see the + [LibreDB Studio repository](https://github.com/libredb/libredb-studio) for details. +- Doris cluster connection information is ready: the FE host address, the FE MySQL protocol port + (default `9030`), a target database, a username, and a password. + +## Connect to Doris + + + + +### 1. Add a connection + +Open LibreDB Studio in your browser, sign in, and click the **+** button to add a new connection. + +![Add a connection](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-add-connection.png) + +### 2. Configure the Doris connection + +Select **MySQL** as the connection type (Doris speaks the MySQL wire protocol, so there is no +separate Doris entry in the connection type list), and fill in: + +| Field | Description | +| --- | --- | +| Host | The FE host address of the Doris cluster. | +| Port | The FE MySQL protocol port, `9030` by default (not MySQL's `3306`). | +| Database | The target database in the Doris cluster's internal catalog. | +| User | The username for the Doris cluster. | +| Password | The password for the Doris cluster. | + +![Configure the connection](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connection-form.png) + +### 3. Test and establish the connection + +Click **Test Connection** to verify, then **Establish Connection** to save it. Test Connection +reports `Connected successfully`, one click of Establish Connection stores the connection, and the +header badge reads **Online**. + +![Connection established](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-connected.png) + +### 4. Browse and query + +Expand the connection in the object browser to see Doris databases and tables, and use the SQL +editor to run queries against the internal catalog. + +![Browse and query Doris](/images/next/connection-integration/data-integration/libredb-studio/libredb-studio-editor.png) + +## Known limitations + +Apache Doris is a fork target for the MySQL connection type rather than a connection type of its +own, so LibreDB Studio reaches it through the same code path as MySQL, MariaDB, and TiDB. Most of +the product works unchanged; the gaps below are the ones worth knowing before you rely on a panel: + +| Area | Status | Detail | +| --- | --- | --- | +| Row counts and byte sizes | Correct | Matched Doris's own `SHOW DATA` output exactly once Doris's background statistics settled, for both row count and byte size. | +| Query cancel | Correct | A `SELECT sleep(8)` was genuinely cancelled; LibreDB Studio reported "Query Cancelled: Query execution was cancelled." | +| Permission errors | Correct | A role granted `SELECT_PRIV` on one table only saw that table in the object browser, and querying the other table returned Doris's own error text, with the specific role, database, table and column names replaced here by placeholders: `Permission denied: user ['role'@'%'] does not have privilege for [...] command on [internal].[db].[table].[column]`. | +| Overview and Health panels | Publish absences | Both answer. The overview shows the real build, read from `@@version_comment` rather than from `version()`, which reports the MySQL version Doris advertises. Doris answers a bare `SHOW STATUS` with zero rows and publishes no `max_connections` variable, so server uptime and the connection count read `N/A, not published` rather than `0`. | +| Index list | Never populated | `information_schema.statistics` is empty on Doris, so no table ever shows an index. | +| Foreign keys | Invisible and unenforced | Accepted by `ALTER TABLE ... ADD CONSTRAINT` and listed by `SHOW CONSTRAINTS`, but absent from `information_schema.KEY_COLUMN_USAGE`, so the schema browser shows no relationship, and Doris itself does not enforce the constraint (a row referencing a nonexistent parent key inserts without error). | +| Explain | Correct | The Explain button returns Doris's own Nereids plan. `EXPLAIN FORMAT='json'` is a parse error on Doris (`mismatched input '='`), so LibreDB Studio sends a plain `EXPLAIN` to this engine instead. | +| Maintenance actions | Partial | `Analyze` runs; `Optimize` and `Check` are not statements in Doris's grammar at all and are rejected as a parse error. | +| Freshly loaded tables | Temporarily zero | A table read 0 rows and 0 B immediately after a 2000-row load, and the true count appeared roughly a minute later once Doris's background statistics caught up. This is Doris's own lag, not a stale connection. | + +For more on using LibreDB Studio, see the +[LibreDB Studio repository](https://github.com/libredb/libredb-studio). diff --git a/versioned_sidebars/version-4.x-sidebars.json b/versioned_sidebars/version-4.x-sidebars.json index 68d980fe0f5af..de883c6afd3f5 100644 --- a/versioned_sidebars/version-4.x-sidebars.json +++ b/versioned_sidebars/version-4.x-sidebars.json @@ -207,6 +207,7 @@ "connection-integration/data-integration/kettle", "connection-integration/data-integration/kyuubi", "connection-integration/data-integration/langfuse", + "connection-integration/data-integration/libredb-studio", "connection-integration/data-integration/logstash", "connection-integration/data-integration/loongcollector", "connection-integration/data-integration/metabase",