Closed yqz945 closed 1 year ago
N.B., for MySQL the statement SET SQL_MODE=ANSI_QUOTES is required to ensure MySQL uses SQL-92 standard quote characters.
>>> import pymysql
>>> connection = pymysql.connect(password='moonpie', database='thangs')
>>> # tell MySQL to use standard quote character
... connection.cursor().execute('SET SQL_MODE=ANSI_QUOTES')
>>> # load data, assuming table "foobar" already exists in the database
... etl.todb(table, connection, 'foobar')
@bluechanel Thank you very much. It's right. I didn't notice the SET statement.
Minimal, reproducible code sample, a copy-pastable example if possible
Problem description
The two got the same error: sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'"tyedu_fct_ac_homework"\' at line 1') [SQL: DELETE FROM "tyedu_fct_ac_homework"]
First I use clickhouse, got the error, then, I change to mysql, the error is still.
Version and installation information
petl.__version__
1.7.11 and 1.7.8