简体   繁体   中英

Issues connecting to Db2 from Jupyter Notebook

dsn_driver = "{IBM DB2 ODBC DRIVER}"

dsn_database = "BLUDB" # eg "BLUDB"

dsn_port = "50000" # eg "50000"

dsn_protocol = "TCPIP" # ie "TCPIP"

%sql ibm_db_sa://usnername:password@Hostname:Port/Database

This is resulting in the following error:Connection info needed in SQLAlchemy format, example:

           postgresql://username:password@hostname/dbname
           or an existing connection: dict_keys([])Can't load plugin:sqlalchemy.dialects:ibm_db_saConnection info needed in SQLAlchemy format, example:
          postgresql://username:password@hostname/dbname
           or an existing connection: dict_keys([])

If anyone can please assist on this that would be great. My problem is that I am entering the service credentials correctly in the %sql ibm_db_sa line so not sure where I am going wrong or where the error can be corrected. Thank you

您需要执行%load_ext sql才能在笔记本中启用 SQL Magic。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM