mirror of
https://github.com/apache/superset.git
synced 2026-04-30 21:44:40 +00:00
Compare commits
4 Commits
semantic-l
...
docs/add-i
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37b233ad73 | ||
|
|
13b4f144f3 | ||
|
|
6927b87c1a | ||
|
|
a9b5870089 |
2
.github/actions/chart-releaser-action
vendored
2
.github/actions/chart-releaser-action
vendored
Submodule .github/actions/chart-releaser-action updated: a917fd15b2...120944e663
@@ -66,6 +66,7 @@ are compatible with Superset.
|
||||
| [Hologres](/docs/configuration/databases#hologres) | `pip install psycopg2` | `postgresql+psycopg2://<UserName>:<DBPassword>@<Database Host>/<Database Name>` |
|
||||
| [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>` |
|
||||
| [InfluxDB 3.0](/docs/databases/influxdb3) | `pip install flightsql-dbapi` | `datafusion+flightsql://{host}:443?token=<influxdb-token>&bucket-name=<bucket-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://` |
|
||||
|
||||
18
docs/docs/databases/influxdb3.mdx
Normal file
18
docs/docs/databases/influxdb3.mdx
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: InfluxDB 3.0
|
||||
hide_title: true
|
||||
sidebar_position: 25
|
||||
version: 1
|
||||
---
|
||||
|
||||
## InfluxDB 3.0
|
||||
|
||||
The [flightsql-dbapi](https://pypi.org/project/flightsql-dbapi/) provides a DB API 2 interface and SQLAlchemy Dialect for Flight SQL that interacts with [InfluxDB 3.0](https://www.influxdata.com/products/influxdb-overview/). The primary SQLAlchemy Dialect provided by flightsql-dbapi targets the DataFusion SQL execution engine.
|
||||
|
||||
### DSN to connect InfluxDB 3.0 to Superset
|
||||
|
||||
```
|
||||
datafusion+flightsql://host:443?token=<influxdb-token>&bucket-name=<bucket-name>
|
||||
```
|
||||
|
||||
This [wiki](https://github.com/influxdata/flightsql-dbapi/wiki/InfluxDB-IOx) gives you more hints on how to use this package.
|
||||
36
superset/db_engine_specs/influxdb3.py
Normal file
36
superset/db_engine_specs/influxdb3.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from superset.constants import TimeGrain
|
||||
|
||||
|
||||
class Influxdb3EngineSpec():
|
||||
|
||||
engine = "influxdb3"
|
||||
engine_name = "influxdb3"
|
||||
|
||||
_time_grain_expressions = {
|
||||
None: "{col}",
|
||||
TimeGrain.SECOND: "DATE_TRUNC('second', {col})",
|
||||
TimeGrain.MINUTE: "DATE_TRUNC('minute', {col})",
|
||||
TimeGrain.HOUR: "DATE_TRUNC('hour', {col})",
|
||||
TimeGrain.DAY: "DATE_TRUNC('day', {col})",
|
||||
TimeGrain.WEEK: "DATE_TRUNC('week', {col})",
|
||||
TimeGrain.MONTH: "DATE_TRUNC('month', {col})",
|
||||
TimeGrain.QUARTER: "DATE_TRUNC('quarter', {col})",
|
||||
TimeGrain.YEAR: "DATE_TRUNC('year', {col})",
|
||||
}
|
||||
Reference in New Issue
Block a user