I need to insert multiple values in PL/SQL with a single call in Python because we have a 3Gb xml file.
Here is my code:
y = 0
for x in range(0,len(rows)):
x = x + 1
if x == y + 500 :
cur.prepare("BULK INSERT INTO cm_raw (fecha,distname,clase,parametro,valor) VALUES (:1,:2,:3,:4,:5)")
datos = [(str(date.today().strftime("%d/%m/%Y")),rows[y:x])]
print (datos)
cur.executemany(None,rows)
con.commit()
con.close
y = x