Skip to content

Using with Apache Superset

Brett Buddin edited this page Jan 24, 2023 · 1 revision

Install from Upstream

  1. Clone the Superset repository:

    $ git clone https://github.com/apache/superset.git
  2. Within the Superset repository create the following file:

    # docker/requirements-local.txt
    flightsql-dbapi
    

    This file instructs Superset to download and install our Python package in all running containers.

  3. Start Superset:

    $ docker-compose -f docker-compose-non-dev.yml up

Install from Local Copy

  1. (flightsql-dbapi) Run make to build flightsql-dbapi to yield dist/flightsql_dbapi-<VERSION>.tar.gz.

  2. (flightsql-dbapi) Start an HTTP server in your flightsql-dbapi repository so Superset can download it:

    $ python3 -m http.server 8000
  3. (superset) Clone the Superset repository:

    $ git clone https://github.com/apache/superset.git
  4. (superset) Within the Superset repository create the following file:

    # docker/requirements-local.txt
    http://docker.for.mac.host.internal:8000/dist/flightsql_dbapi-<VERSION>.tar.gz#egg=flightsql-dbapi
    

    Replace with the version built by make in step 1 (e.g. 0.0.1).

    This file instructs Superset to download and install our Python package in all running containers.

  5. (superset) Start Superset:

    $ docker-compose -f docker-compose-non-dev.yml up

Any changes to flightsql-dbapi will need a rebuild (make) and Superset will need to be stopped and restarted.

Connecting to an upstream server

  1. Log into the server at http://localhost:8088 with the credentials admin/admin.

  2. Add a Database Connection of type "Other" with the following DSN:

    datafusion+flightsql://user:pass@host:port[?token=<token>]
    

Vendor Specific DSNs

  • InfluxDB IOx: datafusion+flightsql://host:443?token=<influxdb-token>&bucket-name=<bucket-name>