Hive 无法使Apache超集连接到Presto DB(此PrestoDB连接到Apache Pinot)

Hive 无法使Apache超集连接到Presto DB(此PrestoDB连接到Apache Pinot),hive,sqlalchemy,presto,apache-superset,superset,Hive,Sqlalchemy,Presto,Apache Superset,Superset,我对ApachePino、PrestoDb和Superset都是新手。我已成功安装了PrestoDB,并使用以下步骤将其连接到Apache Pinot: docker run \ --network pinot-demo \ --name=presto-coordinator \ -p 8080:8080 \ -d apachepinot/pinot-presto:latest 我可以查询PrestoDB,并且已经验证了PrestoDB能

我对ApachePino、PrestoDb和Superset都是新手。我已成功安装了PrestoDB,并使用以下步骤将其连接到Apache Pinot:

    docker run \
      --network pinot-demo \
      --name=presto-coordinator \
      -p 8080:8080 \
      -d apachepinot/pinot-presto:latest
我可以查询PrestoDB,并且已经验证了PrestoDB能够从Pinot获取记录

$ presto/presto-cli --server localhost:8080 \
  --catalog pinot --schema default
    
  presto:default> show catalogs;
  presto:default> select * from my_table limit 10;
    col1   | col2
    --------------------
     val 1 | 1990380139 
     val 2 | 1990380130 
     val 3 | 1990380130 
现在,我使用正式的docker映像和步骤启动并初始化Apache超集。由于默认情况下超集也在8080上运行,所以我使用了-p8088:8080。(不知道这是否是个问题)

在这个超集web应用程序上,我想添加一个新的PrestoDb数据库。以下是我尝试过的SQLAlchemy URI,但超集无法连接到PrestoDB

1. hive://hive@localhost:8080/pinot
2. presto://localhost:8080/
3. presto://localhost:8080/pinot
4. presto://localhost:8080/pinot/default
5. hive://hive@localhost:8080/pinot/default
请帮助我找到正确的SQLAlchemy URI,以便在Apache超集和PrestoDB之间建立连接

1. hive://hive@localhost:8080/pinot
2. presto://localhost:8080/
3. presto://localhost:8080/pinot
4. presto://localhost:8080/pinot/default
5. hive://hive@localhost:8080/pinot/default

值得注意的是,当我分别使用hive和presto方言/驱动程序时,我会遇到以下错误

使用时

hive://hive@本地主机:8000/比诺

使用时

presto://localhost:8000/pinot


当您尝试从超集访问presto时,网络连接在超集容器和presto容器之间,因此localhost将无法工作

您需要获得prestodb容器的真实ip,容器ip或主机ip。你能试试下面的吗

presto://{continer_ip}:8080/pinot
presto://{host_id}:8080/pinot
  • 迪普蒂

如果您在这里没有得到帮助,您也可以尝试上的
#疑难解答
频道。使用容器IP有效!我确保超集容器也在pinot演示网络中运行,并使用$docker inspect presto coordinatorGreat找到了容器IP地址。很高兴它有帮助!
INFO:pyhive.presto:SELECT 1
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8000
presto://{continer_ip}:8080/pinot
presto://{host_id}:8080/pinot