0

我们正在尝试使用 Superset 构建仪表板报告并安装它。我们希望基于 Impala 表构建报告。尝试配置数据源时,我使用了以下 sqlalchemy URI

impala://host:port/dbname

测试连接时出现以下错误。出于安全原因屏蔽了主机名。

在此处输入图像描述

我们已经安装了 impyla

pip install impyla
Collecting impyla
  Downloading impyla-0.14.0.tar.gz (151kB)
    100% |████████████████████████████████| 153kB 4.7MB/s
Requirement already satisfied: six in ./venv/lib/python2.7/site-packages (from impyla)
Collecting bitarray (from impyla)
  Downloading bitarray-0.8.1.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 5.8MB/s
Requirement already satisfied: thrift in ./venv/lib/python2.7/site-packages (from impyla)
Building wheels for collected packages: impyla, bitarray
  Running setup.py bdist_wheel for impyla ... done
  Stored in directory: /root/.cache/pip/wheels/96/fa/d8/40e676f3cead7ec45f20ac43eb373edc471348ac5cb485d6f5
  Running setup.py bdist_wheel for bitarray ... done
  Stored in directory: /root/.cache/pip/wheels/46/63/90/821699390044b2d0c5f2a01f275115e240bd06f0edc6c6a19b
Successfully built impyla bitarray
Installing collected packages: bitarray, impyla
Successfully installed bitarray-0.8.1 impyla-0.14.0 

如果我在这里遗漏了其他任何东西来配置 impala 以与 Superset 一起使用,请告诉我

谢谢,帕尼。

4

1 回答 1

0

让一切完美运行的最简单方法是使用 docker 映像 ( https://hub.docker.com/r/amancevice/superset/ )

如果你想自己安装所有东西,你可以直接从官方 dockerfile 中查看需求列表。(https://hub.docker.com/r/amancevice/superset/~/dockerfile/):

特别看:

apt-get install -y \
    build-essential \
    curl \
    default-libmysqlclient-dev \
    libffi-dev \
    libldap2-dev \
    libpq-dev \
    libsasl2-dev \
    libssl-dev \
    openjdk-8-jdk \
    python3-dev \
    python3-pip && \
apt-get clean && \
rm -r /var/lib/apt/lists/* && \
pip3 install --no-cache-dir \
    flask-cors==3.0.3 \
    flask-mail==0.9.1 \
    flask-oauth==0.12 \
    flask_oauthlib==0.9.3 \
    gevent==1.2.2 \
    impyla==0.14.0 \
    mysqlclient==1.3.7 \
    psycopg2==2.6.1 \
    pyathenajdbc==1.2.0 \
    pyhive==0.5.0 \
    pyldap==2.4.28 \
    redis==2.10.5 \
    sqlalchemy-redshift==0.5.0 \
    sqlalchemy-clickhouse==0.1.1.post3 \
    Werkzeug==0.12.1 \
    superset==${SUPERSET_VERSION}

此外,在数据库字段中写入my_db.my_table并在SQLAlchemy URI中写入impala://host:port

于 2018-04-16T15:43:41.237 回答