March 6, 2012 at 8:46 pm
i have created package which is migration data from two sources A & B into a destination Z .i am just getting one column("date1" it has date from 2000/01/01 to 2015/12/31) from source A.Similarly i am getting one column("Date2" it has data from 1,jan 2009 to 3 march 2012) from source B and source B has one more column timestamp which states when this table updated lasttime but now last time it was updated in jan 31 2012 but i m nt taking this column in destnination Z . Now i am using left merge join so that i will get all the rows from source A(2000 to 2015) and matching rows from source B.and after merge join i have derived column which is used to insert date(starttime) in destination table Z on which package executed.In my destination i have several other columns including date,starttime.and once the data is loaded i have execute sql task in control flow which is used to update other columns as per the destination "date" column, update command will update only those columns in destination table which rows are coming from source B(jan2009 to march2012).before that i am using truncate statement which truncate table everytime before migrating data.so it means every time whether new source B in updating or not whole package will run .but the problem my manager doesnt want this way.he wants i should create a package in such a way that if the rows which i updated yesterday should not updated today .he does not want truncate which i used in my package .i want to compare the timestamp column in source B and starttime in destination.then if source B has updated timestamp then it should compare with destination z.
March 7, 2012 at 12:15 am
You need to implement a lookup component to your destination Z to determine if a row is a new insert or an update. Filter out the updates and do only the inserts.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply