Project Description
Fast and robust console application to import a flat file into SQL Server. Gets data types from destination table and automatically converts data.

How long does it take to build an import procedure using SSIS? using bcp? too long? are you repeating yourself about the data types over and over again? how long until a hard crash because the file changed slightly?

This console app imports a csv file into a SQL server table using one line:
BusyBulkCopy.exe filetoimport.csv server.database.schema.tabletoinsertinto

it will get the datatypes form the destination table, automatically match the columns, import the data.

The idea is that you use this in conjunction with a pre-processing script. The pre-processing script handles your specific source flat file (things like downloading, decompressing, special separators) and gives a csv file compliant to rfc 4180.

BusyBulkCopy will handle the non-specific things: Converting to destination data types, error handling, columns that move, added columns, deleted columns, too wide data, rounding to destination data types where possible, etc. this is all logic that can be shared between all your flat file imports.


Last edited Dec 5, 2014 at 2:12 PM by busytools, version 4