【发布时间】:2021-06-24 01:44:03
【问题描述】:
我正在尝试连接到 Amazon redshift 表。我使用 SQL 创建了表,现在我正在编写一个 Python 脚本来将数据框附加到数据库中。我无法连接到数据库,并且觉得我的语法或其他问题有问题。我的代码如下。
from sqlalchemy import create_engine
conn = create_engine('jdbc:redshift://username:password@localhost:port/db_name')
这是我遇到的错误。
sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string
谢谢!
【问题讨论】:
-
请添加你得到的错误。
-
这篇文章中接受的答案有帮助吗? stackoverflow.com/questions/35004936/…
标签: python database amazon-web-services amazon-redshift