Redshift create table not working via Python

前端 未结 1 1456
悲哀的现实
悲哀的现实 2021-01-14 17:20

As per Unload to S3 with Python using IAM Role credentials, the unload statement worked perfectly. So did other commands I tried, like copy and select statements.

H

1条回答
  •  臣服心动
    2021-01-14 17:40

    Apparently need to add s.commit() in order to create the table.. If you are populating it via copy command or insert into: then add it after the copy command (after the create table is optional). Basically, it does not auto commit for create/alter commands!

    http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#session-faq-whentocreate http://docs.sqlalchemy.org/en/latest/core/connections.html#understanding-autocommit

    0 讨论(0)
提交回复
热议问题