seanharr11 / etlalchemy

Extract, Transform, Load: Any SQL Database in 4 lines of Code.
MIT License
555 stars 83 forks source link

Why not use bcp command? #13

Open stakemura opened 7 years ago

stakemura commented 7 years ago

Hi, SQL Server command-line tools (bcp & sqlcmd) is currently available on UNIX like Windows. Please see Install sqlcmd and bcp the SQL Server command-line tools on Linux.

Also bcp's bulk insert is available on SQL Azure Database and its performance is quite well. Why not use bcp command?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/43885119-why-not-use-bcp-command?utm_campaign=plugin&utm_content=tracker%2F41641218&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F41641218&utm_medium=issues&utm_source=github).
seanharr11 commented 7 years ago

I believe my initial reason for not using BCP was that it added an additional dependency, whereas the rest of the bulk import utilities came out-of-the-box with their respective database clients. (I.e. Mysqlimport, Postgres COPY FROM, etc...).

If you'd like to add support for BCP, please open a pull request! I'd gladly merge this feature in. Just be sure to check to see if BCP is installed and available on the user's PATH, and if it isn't, gracefully fall back to the default, slow SQL Server insert.

seanharr11 commented 7 years ago

(I also must also admit that I have never personally used the BCP command, nor am I a Windows/SQL Server guru, so you likely already know about this than me.)

stakemura commented 7 years ago

I appreciate your quick reply. Ok, If I succeed to make the patch, I will open the pull request.

seanharr11 commented 7 years ago

Ok awesome. That would be a huge help, the BCP command looks pretty powerful/fast.

If you have any questions feel free to ask and I'll do my best to help with the feature integration.