Prev | Current Page 89 | Next

Jayaram Krishnaswamy

"Beginners Guide to SQL Server Integration Services Using Visual Studio 2005"


Data Transfer from a Text File using the Bulk Insert Task
[ 124 ]
The following are the major steps in this exercise:
Use/create a flat text file whose contents need to be transferred.
Create a SQL Server database table with columns that can accept the contents
of the file created in the previous step.
Create a BI Project and add a Bulk Insert Task.
Configure the Bulk Insert Task.
Build and execute the package.
Step 1: Use / create a Flat Text File whose
Contents Need to be Transferred
Normally, this file should be available, as this is the starting point. Since this is just a
demo, we will be using a file with 10 rows, of which the 1st row is a column header,
a ludicrously small file for this heavy weight tool. This file can be created with a text
editor such as Notepad, but usually, it is resident in legacy data stores.
1. Create a text file in Notepad called SsisBulk.txt and save it on C:\ drive.
The following screenshot shows the contents of this file. You may create your
own text file (alternatively, a suitable CSV file such as the one from an earlier
chapter can also be used). The following screenshot shows a couple of rows
of this file. In practice, however, large amounts of data with tens of thousands
of lines of data can be transferred.
Step 2: Create a Table with Columns that Can
Accept the Contents of the File Created
The data in the above text file will be transferred to a table in the MyNorthwind
database.


Pages:
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
ABBA jednoreki bandyta przeciski pod drogami meble do sypialni pomoce dydaktyczne