Is it possible to get the Microsoft ODBC Driver for SQL instead of FreeTDS?
I have come to learn that there are some restrictions with FreeTDS , from "stackoverflow:
"fast_executemany = True uses an ODBC feature called "parameter arrays" and that feature is not supported by all ODBC drivers. Apparenty FreeTDS ODBC is one of those drivers that does not support it.
If you really need to use fast_executemany = True you can use Microsoft's ODBC Driver for SQL Server. It does support ODBC parameter arrays."
I tried to install it for linux following this guide, though without luck.
The result of using FreeTDS is that it is very slow at importing my dataframe into a mssql server. Normally people use:
engine = sqlalchemy.create_engine(conn, fast_executemany=True) df.to_sql(table_name, engine, if_exists = 'replace', chunksize = None)
Though this is not an option with FreeTDS and result in python crashing.