Database Reference
In-Depth Information
and scalability, I would attempt to ascertain the number of rows before loading the file
and then integrate the functionality demonstrated in this package into the loader pack-
age. For smaller loads of data that will not scale, this package is acceptable.
The Archive File Pattern
The Archive File pattern is largely responsible for the topic you are now reading. How?
It was the first widely adopted design pattern package that I built. After re-using this
pattern in several locations, I became convinced SSIS lent itself to design pattern-based
architectures. Shortly after this realization, I discussed the idea over dinner in Bellevue,
Washington with friends who work with SSIS and who also write topics. We agreed
design patterns offer interesting solutions to many data integration problems.
The ArchiveFile package is designed to copy a flat data file from one directory
to another, appending a datetime stamp to the original file name. The full path of the
original file is supplied in the SourceFilePath parameter, the format of the date-
time stamp in the DateStampFormat parameter. The destination, or Archive, direct-
ory is supplied to the ArchiveDirectory parameter. Should the target file already
exist, you can control overwrites of the destination file via the OverwriteDestin-
ation parameter. The package usually deletes the original file, but the CopyOnly
parameter controls this function. If the SourceFilePath is not found, you can raise
an error or simply log this condition. The ExceptionOnFileNotFound parameter
controls whether the package raises an error if the source file is not found. Finally, the
Debug parameter controls whether the package is being executed in Debug mode
(something I cover in more detail in Chapter 2 ). The ArchiveFile package para-
meters, when configured, will appear as in Figure 7-29 .
 
 
Search WWH ::




Custom Search