Database Reference
In-Depth Information
Figure 7-5 . Inside the data flow path
I often describe the buffers inside the data flow as “table-ish.” It's an adjective I
made up, but it fits. This peek under the hood of a data flow path is evidence. We'll
come back to this diversion shortly. Click OK to close the Data Flow Path Editor.
Rename the OLE DB destination adapter FlatFileDest . Open the OLE DB
Destination Editor and click the New button beside the OLE DB Connection Manager
drop-down to configure an OLE DB connection manager. When the Configure OLE
DB Connection Manager window displays, click the New button to create a new OLE
DB connection manager. Add the name of your testing and development server/in-
stance (the same server/instance you used earlier to create the StagingDB database)
in the Server Name drop-down. In the Select or Enter a Database Name drop-down, se-
lect StagingDB. Click the OK button to complete the OLE DB connection manager
configuration, and click the next OK button to select this new connection manager for
use with the OLE DB destination adapter. Set the Data Access Mode property to
Table or View - Fast Load and accept the default properties configured.
Click the New button beside the Name of the Table or the View drop-down. The Create
Table window displays the T-SQL data definition language (DDL) statement shown in
Listing 7-2 .
Listing 7-2 . The CREATE TABLE Statement Generated from the Data Flow Path
Metadata
CREATE TABLE [FlatFileDest] (
[RecordType] varchar(50),
[Name] varchar(50),
[Value ] varchar(50),
[strRecordType] varchar(1),
[strName] varchar(50),
[intValue] int
)
The name of the table the OLE DB destination is going to create is
FlatFileDest —the name you gave the OLE DB destination adapter. Where did the
column names come from? That's right! From the data flow path metadata we viewed
earlier. This functionality is pretty cool, when you think about it.
You don't need all these columns to store your data in your StagingDB . Since
you are using this table to stage data from the flat file, use the same column names you
 
 
Search WWH ::




Custom Search