Relative Content

Tag Archive for pythonfastapi

Bulk insert into SQL Server from python

I have a FastAPI endpoint in python that needs to insert a few thousand rows into a SQL Server table. I have the data in a pandas dataframe and currently I’m looping over the dataframe and inserting them individually. Is there a way to do a bulk insert as this process is timing out the endpoint as it takes too long. I can’t use SQLalchemy as the FastAPI script is on an Azure server and SQLalchemy crashes the server.