kubernetescluster-computingapache-supersetkylin

Could not load database driver: KylinEngineSpec


Just install Apache Superset within Kubernetes. Already have a working Apache Kylin Cluster in the same Kubernetes Cluster. While trying to connect Kylin within Superset i get the following error message:

ERROR: Could not load database driver: KylinEngineSpec

Superset is installed using this repo:

helm repo add superset https://apache.github.io/superset

The connection string which is used:

kylin://<username>:<password>@<hostname>:<port>/<project name>

Any ideas?


Solution

  • By default superset comes with no KylinEngineSpec driver installed. You need to provide it as an additional requirement at install.

    Recommended driver for Apache Kylin is kylinpy [reference].

    Update

    The documentation is a bit misleading. Specifying additional packages in additionalRequiremets does not properly install them. Instead you have to add those to bootstrapScript.
    Create a file with overrides (in my case it will be my-values.yaml), add below to this file

    bootstrapScript: |
      #!/bin/bash
      rm -rf /var/lib/apt/lists/* && \
      pip install \
        kylinpy \
        psycopg2==2.8.5 \
        redis==3.2.1 && \
      if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi
    

    Rembember, this will override bootstrapScript not add to it
    Then, to install superset with new values

    helm upgrade --install --values my-values.yaml <release-name> superset/superset
    

    Replace <release-name> witho your desired name
    or upgrade, if you already have superset installed

    helm upgrade --values my-values.yaml <release-name> superset/superset
    

    Again replace <release-name> with your release name
    Then, after execing into a pod, you can see kylinpy was installed

    root@superset-868c768599-24xc2:/app# pip list | grep kylinpy
    kylinpy                2.8.4
    

    To install it specify additionalRequirements with --set flag [reference]

    helm install --set additionalRequirements={kylinpy} <release-name> superset/superset
    

    replace <release-name> with your desired name

    If you already have superset installed, you can perform an upgrade:

    helm upgrade --set additionalRequirements={kylinpy} <release-name> superset/superset
    

    Again, replace <release-name> with your release name

    Use helm get values to see whether that new setting took effect. You should see something like

    USER-SUPPLIED VALUES:
    additionalRequirements:
    - kylinpy
    

    I strongly recommend going through official docs about running superset in Kubernetes. There are a lot more settings to change other than database drivers.