Question : Update SSIS Data Flow Column Using Data From CSV file

Hello,

I'm relatively new to SSIS, so hopefully there is a simple solution to what may appear to be a trivial problem.  I have a package that loads data into a dimension table.  I need some advice as to the best way to update a column in the data flow based on a value in a CSV file.

Example:
External CSV file has a listing of Customer Product Numbers (OurProductNumber,CustomerProductNumber).  I need to bring this csv file into my dataflow and update the CustomerProductNumber field based on the linkage between the ProductNumber from the data flow and the OurProductNumber from the csv file.

This transformation has to be done on the data flow design surface.  In other words I can't load the csv file to a table and do an UPDATE sql statement.

Any help would be greatly appreciated.

Ltrain

Answer : Update SSIS Data Flow Column Using Data From CSV file

OK, I think I got it now.
suppose you have table1(f1,f2,f3,...)
and csv(c1,c2,...,OurProdNumber,CustomerProdNumber,boolfield, ...)

1-you fetched all data from flat file source(csv) and oledb data source(table1)
2-add a sort transformation after each source(you must sort data before joining them in SSIS) , sort them by join fileds if it is OurProdNumber,then do it on this field
3-add a Merge Join transformation and set Left Outer Join (Oledb on left and flat file on the right) on OurProdNumber)
4-now the result have all fields together joined by OurProdNumber
5-add a Script Component Transformation
6-in this component read the equivalent field from oledb and set flat file with it, like this:
Row.OutCustomerProdNumber=Row.CustomerProdNumber;
...
this will set values of input CustomerProdNumber to output column OutCustomerProdNumber
7-now you have corrected and updated data when you want to use in your destination.


If you can't do these , upload your table structure,csv file, sample data from table and ssis package here for deeper considerations.
Random Solutions  
 
programming4us programming4us