0

这是我第一次通过 python 连接到 Qubole。

我可以按照以下示例直接使用 jaydebeapi 进行连接:this example,但是当按照pypiqubole指令使用 sqlalchemy-qubole 时,我收到有关缺少密码密钥的错误。我尝试将 API 密钥直接嵌入到连接字符串中并得到相同的错误,所以我假设这与我如何形成连接字符串无关。

代码:

    engine = create_engine('qubole+presto://presto/presto_cluster?endpoint=https://us.qubole.com;password=' + 
                               api_key + ';catalog_name=hive')
    with engine.connect() as con:
        rs = con.execute('SHOW TABLES')

错误信息:


    *(stacktrace excluded)*
    java.sql.SQLNonTransientConnectionExceptionPyRaisable: java.sql.SQLNonTransientConnectionException: [Qubole][JDBC](10100) Connection Refused: [Qubole][JDBC](11640) Required Connection Key(s): password

4

0 回答 0