RE: ERROR when inserting csv values into sql table
David Raymond <david.raymond@tomtom.com>
From: David Raymond <David.Raymond@tomtom.com>
To: "pgsql-novice@postgresql.org" <pgsql-novice@postgresql.org>
Date: 2019-06-13T14:08:32Z
Lists: pgsql-novice
LINE 1: INSERT INTO movies(title, year, runtime, 'imdbID', 'imdbRati...
You used single quotes for the part with column names. Double quotes are for identifies, single quotes are string literals. So it looks like it need to be
insert_statement = sqlalchemy.text('INSERT INTO movies(title, year, runtime, "imdbID", "imdbRating") VALUES (:title, :year, :runtime, :imdbID, :imdbRating)')