-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: superset and metabase integration (#1179)
Co-authored-by: Yiran <cuiyiran3@gmail.com> Co-authored-by: jeremyhi <jiachun_feng@proton.me>
- Loading branch information
1 parent
3ea4f8b
commit 671a4f1
Showing
11 changed files
with
233 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Metabase | ||
|
||
[Metabase](https://github.com/metabase/metabase) is an open source BI tool that | ||
written in Clojure. You can configure GreptimeDB as a metabase data source from | ||
a community driver plugin. | ||
|
||
See [our docs](https://docs.greptime.com/user-guide/integrations/metabase) for | ||
the instructions of plugin installation. | ||
|
||
## Connection information | ||
|
||
- Database type: `GreptimeDB` | ||
- Host: `<host>` | ||
- Port: `4003` | ||
- Database name: `<dbname>` | ||
- User: `<username>` | ||
- Password: `<password>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Superset | ||
|
||
[Superset](https://superset.apache.org) is an open source BI tool that written | ||
in Python. You can configure GreptimeDB as a metabase data source from python | ||
package. | ||
|
||
See [our docs](https://docs.greptime.com/user-guide/integrations/superset) for | ||
the instructions of plugin installation. | ||
|
||
## Connection information | ||
|
||
Select `GreptimeDB` from database list. | ||
|
||
Use following SQlAlchemy URL for connection: | ||
|
||
``` | ||
greptimedb://<username>:<password>@<host>:4003/<dbname> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Metabase | ||
|
||
[Metabase](https://github.com/metabase/metabase) is an open source BI tool that | ||
written in Clojure. You can configure GreptimeDB as a metabase data source from | ||
a community driver plugin. | ||
|
||
## Installation | ||
|
||
Download the driver plugin file `greptimedb.metabase-driver.jar` from its | ||
[release | ||
page](https://github.com/greptimeteam/greptimedb-metabase-driver/releases/latest/). Copy | ||
the jar file to `plugins/` of metabase's working directory. It will be | ||
discovered by Metabase automatically. | ||
|
||
## Add GreptimeDB as database | ||
|
||
To add GreptimeDB database, select *Settings* / *Admin Settings* / *Databases*, | ||
click *Add Database* button and select GreptimeDB from *Database type*. | ||
|
||
You will be asked to provide host, port, database name and authentication | ||
information. | ||
|
||
- Use Greptime's Postgres protocol port `4003` as port. If you changed the | ||
defaults, use you own settings. | ||
- Username and password are optional if you didn't enable | ||
[authentication](/user-guide/operations/authentication.md). | ||
- Use `public` as default *Database name*. When using GreptimeCloud instance, | ||
use the database name from your instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Superset | ||
|
||
[Apache Superset](https://superset.apache.org) is an open source BI tool that | ||
written in Python. To configure GreptimeDB as a database in Superset, you can | ||
follow this guide. | ||
|
||
## Installation | ||
|
||
### Running Superset with Docker Compose | ||
|
||
[Docker compose](https://superset.apache.org/docs/installation/docker-compose) | ||
is the recommended way to run Superset. To add GreptimeDB extension, create a | ||
`requirements-local.txt` file in `docker/` of Superset codebase. | ||
|
||
Add GreptimeDB dependency in `requirements-local.txt`: | ||
|
||
```txt | ||
greptimedb-sqlalchemy | ||
``` | ||
|
||
Start Superset services: | ||
|
||
```bash | ||
docker compose -f docker-compose-non-dev.yml up | ||
``` | ||
|
||
### Running Superset Locally | ||
|
||
If you are [running Superset from | ||
pypi](https://superset.apache.org/docs/installation/pypi), install our extension | ||
to the same environment. | ||
|
||
```bash | ||
pip install greptimedb-sqlalchemy | ||
``` | ||
|
||
## Add GreptimeDB as database | ||
|
||
To add GreptimeDB database, select *Settings* / *Database Connections*. | ||
|
||
Add database and select *GreptimeDB* from list of supported databases. | ||
|
||
Follow the SQLAlchemy URI pattern to provide your connection information: | ||
|
||
``` | ||
greptimedb://<username>:<password>@<host>:<port>/<database> | ||
``` | ||
|
||
- Ignore `<username>:<password>@` if you don't have | ||
[authentication](/user-guide/operations/authentication.md) enabled. | ||
- Use `4003` for default port (this extension uses Postgres protocol). | ||
- Use `public` as default `database`. When using GreptimeCloud instance, use the | ||
database name from your instance. |
16 changes: 16 additions & 0 deletions
16
...h/docusaurus-plugin-content-docs/current/greptimecloud/integrations/metabase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Metabase | ||
|
||
[Metabase](https://github.com/metabase/metabase) 是一个用 Clojure 编写的开源 BI | ||
工具,可以通过社区维护的数据库驱动将 GreptimeDB 添加到 Metabase。 | ||
|
||
关于插件的安装,请[查看文 | ||
档](https://docs.greptime.com/user-guide/integrations/metabase). | ||
|
||
## 连接信息 | ||
|
||
- 数据库类型: `GreptimeDB` | ||
- 主机名: `<host>` | ||
- 端口: `4003` | ||
- 数据库名: `<dbname>` | ||
- 用户名: `<username>` | ||
- 密码: `<password>` |
17 changes: 17 additions & 0 deletions
17
...h/docusaurus-plugin-content-docs/current/greptimecloud/integrations/superset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Superset | ||
|
||
[Apache Superset](https://superset.apache.org) 是开源的 BI 工具,用 Python 编写。 | ||
以下内容可以帮助你把 GreptimeDB 作为 Superset 的数据源。 | ||
|
||
关于插件的安装,请[查看文 | ||
档](https://docs.greptime.com/user-guide/integrations/superset). | ||
|
||
## 连接信息 | ||
|
||
从数据库列表中选择 `GreptimeDB`。 | ||
|
||
填写以下 URL | ||
|
||
``` | ||
greptimedb://<username>:<password>@<host>:4003/<dbname> | ||
``` |
25 changes: 25 additions & 0 deletions
25
i18n/zh/docusaurus-plugin-content-docs/current/user-guide/integrations/metabase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Metabase | ||
|
||
[Metabase](https://github.com/metabase/metabase) 是一个用 Clojure 编写的开源 BI | ||
工具,可以通过社区维护的数据库驱动将 GreptimeDB 添加到 Metabase。 | ||
|
||
## 安装 | ||
|
||
从 [发布 | ||
页](https://github.com/greptimeteam/greptimedb-metabase-driver/releases/latest/) | ||
下载最新的驱动插件文件 `greptimedb.metabase-driver.jar`,并将文件拷贝到 Metabase | ||
的工作目录下 `plugins/` 目录中(如果不存在需要创建 `plugins/`)。当 Metabase 启 | ||
动时,会自动检测到插件。 | ||
|
||
## 添加 GreptimeDB 数据库 | ||
|
||
选择 *设置* / *管理员设置* / *数据库*, 点击 *添加数据库* 按钮并选择 GreptimeDB | ||
作为 *数据库类型*. | ||
|
||
进一步添加其他数据库信息: | ||
|
||
- 端口请填写 GreptimeDB 的 Postgres 协议端口 `4003`。 | ||
- 如果没有开启[认证](/user-guide/operations/authentication.md),用户名和密码字段 | ||
是可选的。 | ||
- 默认填写 `public` 作为 *数据库名*。如果是使用 GreptimeCloud 的实例,可以从控制 | ||
台复制数据库名称。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
i18n/zh/docusaurus-plugin-content-docs/current/user-guide/integrations/superset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Superset | ||
|
||
[Apache Superset](https://superset.apache.org) 是开源的 BI 工具,用 Python 编写。 | ||
以下内容可以帮助你把 GreptimeDB 作为 Superset 的数据源。 | ||
|
||
## 安装 | ||
|
||
### 用 Docker Compose 运行 Superset | ||
|
||
[Docker compose](https://superset.apache.org/docs/installation/docker-compose) | ||
是 Superset 的推荐使用方式。在这种运行方式下,需要在 Superset 代码目录下的 | ||
`docker/` 中添加一个 `requirements-local.txt`。 | ||
|
||
并将 GreptimeDB 依赖加入到 `requirements-local.txt`: | ||
|
||
```txt | ||
greptimedb-sqlalchemy | ||
``` | ||
|
||
启动 Supertset 服务: | ||
|
||
```bash | ||
docker compose -f docker-compose-non-dev.yml up | ||
``` | ||
|
||
### 本地运行 Superset | ||
|
||
假如你通过 [Pypi 包安装和运行 | ||
Superset](https://superset.apache.org/docs/installation/pypi),需要将 GreptimeDB | ||
的依赖安装到相同的 Python 环境。 | ||
|
||
```bash | ||
pip install greptimedb-sqlalchemy | ||
``` | ||
|
||
## 添加 GreptimeDB 数据库 | ||
|
||
准备添加,选择 *设置* / *数据库连接*. | ||
|
||
添加数据库,并在支持的数据库列表中选择 *GreptimeDB*。 | ||
|
||
根据 SQLAlchemy URI 的规范,填写以下格式的数据库连接地址。 | ||
|
||
``` | ||
greptimedb://<username>:<password>@<host>:<port>/<database> | ||
``` | ||
|
||
- 如果没有启动[认证](/user-guide/operations/authentication.md),可以忽略 | ||
`<username>:<password>@` 部分。 | ||
- 默认端口 `4003` (我们用 PostgresSQL 协议通信)。 | ||
- 默认数据库 `public`。如果是使用 GreptimeCloud 实例,可以从控制台复制数据库名称。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters