简体   繁体   中英

How can I perform a bulk insert with python in CrateDB?

I'm trying to do a bulk insert using python in CrateDB. The command executemany doesn't really perform a bulk insert, in the same way it does with SQL Server using pyodbc. With pyodbc I can use this:

cursor.fast_executemany = True

to solve the problem, as mentioned here . But with the library "crate" for python I don't have this option. Is there a workaround?

unlike pyodbc the cratedb python driver does a real bulk insert without that option. see the example in our documentation https://crate.io/docs/clients/python/en/latest/client.html#inserting-data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM