Invalid argument(s) 'fast_executemany' sent to create_engine()

Viewed 326

I have a piece of code that dumps a dataframe with 30k rows into a table on my Vertica database. But since its taking way too long to run, I'm trying to use fast_executemany parameter of sqlalchemy.

engine = sa.create_engine(('vertica+pyodbc:///?odbc_connect=DRIVER%3D%7Bvertica%7D%3BSERVER%3Djsvertica%3BDATABASE%3Dpw%3BUID%3Dusername%3BPWD%password%3B'),
                            fast_executemany=True,)# connecting to Vertica using SQL Alchemy

But I'm getting this error:

Invalid argument(s) 'fast_executemany' sent to create_engine(),
using configuration VerticaDialect/QueuePool/Engine.
Please check that the keyword arguments are appropriate for this combination of components. 

What am I doing wrong?

1 Answers

fast_executemany is apparently not implemented in the Vertica dialect for SQLAlchemy. In order for that option to be recognized the dialect would have to be modified similar to the way SQLAlchemy's built-in mssql+pyodbc:// dialect supports it. But before doing that the developers of the Vertica dialect would want to confirm that the Vertica ODBC driver works properly with fast_executemany = True because not all drivers can use it.

Related