SQL Server Business Intelligence

SQL SERVER 2005 & 2008 IS THE MAIN THEME OF THIS BLOG

Thursday, March 09, 2006

Moving Files - Source to Working Dir

The project currently I am working on had the following directory structure.

C:\Data\SourceFiles - This dir will have source files.
C:\Data\ArchiveFiles - Once the data is loaded move it from working to archive dir.
C:\Data\WorkingFiles - Move source files to working dir.
C:\Data\ControlFiles - Single control file per dimension.

One of the dimension we have is payment type which is made out of 2 files, such as paytype and paytygrp. Each time we receive files with different names, but first 8 characters of the file is fixed. Some of our dimension has upto 24 different files, therefore we decided to use a control file with the delimiter of "-". In the control file we have source file name and final source file name.

One of my collegue(Rastko) wrote a script to move the files from source directory to working directory. You can download the entire script here.

Thanks
Sutha

0 Comments:

Post a Comment

<< Home