SSIS - Data Conversion and Derived Column

Scenario:

Lets say we have some data in text file that we need to load into our SQL table. We have to perform data conversion on SaleDate and then also have to get previous date from SaleDate to insert into our final Table.

Solution :

Step 1:
Create file file source by using Flat File Source.
Step 2:
Bring Data Conversion and connect to Flate File Source as shown and convert the data type to DT_DBDATE

Step 3:
Bring Derived column Transformation so we can get previous date from SaleDate coming from Source. Remember we have converted the SaleDate to DT_DBDate and now we will use column Copy of SaleDate in our Derived Column.


Final Output:

Put Data Viewer between Derived column and Destination so see if all values are transformed correctly.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.