Skip to content

Commit

Permalink
docs: superset and metabase integration (#1179)
Browse files Browse the repository at this point in the history
Co-authored-by: Yiran <cuiyiran3@gmail.com>
Co-authored-by: jeremyhi <jiachun_feng@proton.me>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent 3ea4f8b commit 671a4f1
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 2 deletions.
17 changes: 17 additions & 0 deletions docs/greptimecloud/integrations/metabase.md
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>`
18 changes: 18 additions & 0 deletions docs/greptimecloud/integrations/superset.md
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>
```
28 changes: 28 additions & 0 deletions docs/user-guide/integrations/metabase.md
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.
3 changes: 2 additions & 1 deletion docs/user-guide/integrations/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ The subsequent sections offer comprehensive guidance on integrating GreptimeDB w
- [Prometheus](./prometheus.md)
- [Vector](./vector.md)
- [Grafana](./grafana.md)
- [Superset](./superset.md)
- [Metabase](./metabase.md)
- [EMQX](./emqx.md)

53 changes: 53 additions & 0 deletions docs/user-guide/integrations/superset.md
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.
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>`
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>
```
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 的实例,可以从控制
台复制数据库名称。
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ GreptimeDB 可以与流行的数据写入、查询和可视化工具无缝集成
- [Prometheus](./prometheus.md)
- [Vector](./vector.md)
- [Grafana](./grafana.md)
- [Superset](./superset.md)
- [Metabase](./metabase.md)
- [EMQX](./emqx.md)

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 实例,可以从控制台复制数据库名称。
4 changes: 4 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ const sidebars: SidebarsConfig = {
'user-guide/integrations/prometheus',
'user-guide/integrations/vector',
'user-guide/integrations/grafana',
'user-guide/integrations/superset',
'user-guide/integrations/metabase',
'user-guide/integrations/emqx',
],
},
Expand Down Expand Up @@ -233,6 +235,8 @@ const sidebars: SidebarsConfig = {
'greptimecloud/integrations/vector',
'greptimecloud/integrations/emqx',
'greptimecloud/integrations/streamlit',
'greptimecloud/integrations/superset',
'greptimecloud/integrations/metabase',
'greptimecloud/integrations/mindsdb',
{
type: 'category',
Expand Down

0 comments on commit 671a4f1

Please sign in to comment.