Matthew Maldonado
07/27/2020, 12:06 PMAlex Cano
07/27/2020, 3:00 PMMatthew Maldonado
07/28/2020, 2:50 PMMatthew Maldonado
07/28/2020, 2:50 PMMatthew Maldonado
07/28/2020, 2:54 PMMatthew Maldonado
07/28/2020, 3:12 PMMatthew Maldonado
07/28/2020, 3:18 PMZachary Hughes
07/28/2020, 3:22 PMpymysql without Prefect suggests this is an issue at the pymysql layer or in the DB itself.
You mentioned something about an Oracle connector-- how does that factor into your setup?Matthew Maldonado
07/28/2020, 4:30 PMMatthew Maldonado
07/28/2020, 4:31 PMZachary Hughes
07/28/2020, 4:49 PMmypysql more generally, it looks like you need to specify that you want to commit in order for your changes to be saved.
It looks like that defaults to False in the task library-- is there any chance that you're not getting back a response because the transaction isn't being committed?Matthew Maldonado
07/28/2020, 4:50 PMtry:
with connection.cursor() as cursor:
cursor.execute("DROP TABLE pymysql_test")
sql = "CREATE TABLE pymysql_test AS SELECT DISTINCT Location as Location from ct_qty_on_hand"
cursor.execute(sql)
cursor.execute("ALTER TABLE pymysql_test ADD Id BIGINT PRIMARY KEY AUTO_INCREMENT")
cursor.execute("CREATE INDEX location ON pymysql_test(Location(4))")
finally:
connection.close()Matthew Maldonado
07/28/2020, 4:51 PMMatthew Maldonado
07/28/2020, 4:51 PMMatthew Maldonado
07/28/2020, 4:51 PMZachary Hughes
07/28/2020, 4:52 PMMatthew Maldonado
07/29/2020, 8:23 PMMatthew Maldonado
07/29/2020, 8:23 PMZachary Hughes
07/29/2020, 8:38 PMMatthew Maldonado
07/31/2020, 8:29 PM