Skip to content

Commit

Permalink
feat(database): Add OceanBase support (apache#29496)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanoOo authored Jul 9, 2024
1 parent b481bc9 commit b4560d4
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/docs/configuration/databases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ are compatible with Superset.
| [IBM Db2](/docs/configuration/databases#ibm-db2) | `pip install ibm_db_sa` | `db2+ibm_db://` |
| [IBM Netezza Performance Server](/docs/configuration/databases#ibm-netezza-performance-server) | `pip install nzalchemy` | `netezza+nzpy://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [MySQL](/docs/configuration/databases#mysql) | `pip install mysqlclient` | `mysql://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [OceanBase](/docs/configuration/databases#oceanbase) | `pip install oceanbase_py` | `oceanbase://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [Oracle](/docs/configuration/databases#oracle) | `pip install cx_Oracle` | `oracle://` |
| [PostgreSQL](/docs/configuration/databases#postgres) | `pip install psycopg2` | `postgresql://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
| [Presto](/docs/configuration/databases#presto) | `pip install pyhive` | `presto://` |
Expand Down Expand Up @@ -988,6 +989,19 @@ Here's the recommended connection string:
netezza+nzpy://{username}:{password}@{hostname}:{port}/{database}
```

#### OceanBase

The [sqlalchemy-oceanbase](https://pypi.org/project/oceanbase_py/) library is the recommended
way to connect to OceanBase through SQLAlchemy.


The connection string for OceanBase looks like this:

```
oceanbase://<User>:<Password>@<Host>:<Port>/<Database>
```


#### Ocient DB

The recommended connector library for Ocient is [sqlalchemy-ocient](https://pypi.org/project/sqlalchemy-ocient).
Expand Down
5 changes: 5 additions & 0 deletions docs/src/resources/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,9 @@ export const Databases = [
href: 'https://doris.apache.org/',
imgName: 'doris.png',
},
{
title: 'OceanBase',
href: 'https://www.oceanbase.com/',
imgName: 'oceanbase.svg',
},
];
67 changes: 67 additions & 0 deletions docs/static/img/databases/oceanbase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ vertica = ["sqlalchemy-vertica-python>=0.5.9, < 0.6"]
netezza = ["nzalchemy>=11.0.2"]
starrocks = ["starrocks>=1.0.0"]
doris = ["pydoris>=1.0.0, <2.0.0"]
oceanbase = ["oceanbase_py>=0.0.1"]
development = [
"docker",
"flask-testing",
Expand Down
67 changes: 67 additions & 0 deletions superset-frontend/src/assets/images/oceanbase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b4560d4

Please sign in to comment.