当我尝试复制到AWS redshift时遇到此问题.这是我试图运行的代码:
with open('path/to/files, 'rb') as fo:
cursor.copy_from(fo, 'schema.table', sep=',')
cursor.commit()
Run Code Online (Sandbox Code Playgroud)
我遇到了错误:
psycopg2.ProgrammingError: syntax error at or near "stdin"
LINE 1: ...Y schema.table FROM stdin WITH...
Run Code Online (Sandbox Code Playgroud)
我用psycopg2运行python 3.5.希望你们能帮忙!Thx提前!