I have many polygons to insert. This code is ready to use.
geom_str = '"MDSYS"."SDO_GEOMETRY"(2003,NULL,NULL,"MDSYS"."SDO_ELEM_INFO_ARRAY"(1,1003,1),"MDSYS"."SDO_ORDINATE_ARRAY"(-735342,-1010550,-735347,-1010551,-735347,-1010563,-735342,-1010563,-735342,-1010550))'
insert = u'''INSERT INTO poly_gr (geomtype, sdo_geom ) VALUES ("TARGET"."LIDS_GEOMTYPE"(1002,6) ,%s)''' %geom_str
cur.execute(insert)
But this is vary lazy. I would like use variables in execute statement. Like this
insert = u'''INSERT INTO poly_gr (geomtype, sdo_geom ) VALUES (:1 ,:2)'''
cur.execute(insert, ('"TARGET"."LIDS_GEOMTYPE"(1002,6)', geom_str)
Do you know how can I insert geometry or own datatype variable with cx_Oracle module? I would like use executemany() in next step for more powerfull aplication.