Metadata-Version: 2.1
Name: bcpy
Version: 0.0.1
Summary: Microsoft SQL Server bcp (Bulk Copy) wrapper
Home-page: https://github.com/titan550/bcpy
Author: John Shojaei
Author-email: titan550@gmail.com
License: UNKNOWN
Keywords: bcp mssql
Platform: UNKNOWN
Classifier: Topic :: Database
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: SQL
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# bcpy

This package is a wrapper for Microsoft's SQL Server bcp utility. Current database drivers available in Python are not fast enough for transferring millions of records (yes, I have tried [pyodbc fast_execute_many](https://github.com/mkleehammer/pyodbc/wiki/Features-beyond-the-DB-API#fast_executemany)). Despite the IO hits, the fastest option by far in saving the data to a CSV file in file system (preferably /dev/shm tmpfs) and using the bcp utility to transfer the CSV file to SQL Server.

## Requirements

You need a working version of Microsoft bcp installed in your system. Your PATH environment variable should contain the directory of the bcp utility. Following are the installation tutorials for different operating systems.

- [Install bcp on Linux](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools)
- [Install bcp on Windows](https://docs.microsoft.com/en-us/sql/tools/bcp-utility)

