【发布时间】: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