【问题标题】:IBM SQL for data science course Peer-Graded AssignmentIBM SQL 数据科学课程 Peer-Graded Assignment
【发布时间】:2022-07-18 20:48:04
【问题描述】:

您好,我正在学习 SQL 数据科学课程,连接到 IBM 数据库时遇到问题。如果您是参加过这门课程的人,您能否解释一下您是如何与此示例联系的:

%sql ibm_db_sa://my-username:my-password@my-hostname:my-port/my-db-name?security=SSL

我可以在凭据中找到以下信息:

port : is the database port

db : is the database name

host : is the hostname of the database instance

username : is the username you'll use to connect

password : is the password you'll use to connect

当我尝试与此代码建立连接时,我收到了以下警告:

Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])
dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ibm_db.cpython-310-darwin.so,

0x0002): 在平面命名空间“_SQLAllocHandle”中找不到符号 SQLAlchemy 格式所需的连接信息,例如: postgresql://username:password@hostname/dbname 或现有连接:dict_keys([])

因为这个问题,我无法完成我的课程。如果你知道答案,请与我分享。谢谢。

【问题讨论】:

    标签: sql


    【解决方案1】:

    我解决了这个问题。如果您遇到此类问题,请尝试不带引号的问题。

    【讨论】:

      【解决方案2】:

      ? 更改为; 并在末尾添加;

      【讨论】:

        猜你喜欢
        • 2019-11-30
        • 2023-03-27
        • 1970-01-01
        • 2021-06-03
        • 1970-01-01
        • 2019-06-10
        • 1970-01-01
        • 1970-01-01
        • 2020-02-03
        相关资源
        最近更新 更多