I am currently using a database that is poorly designed and a slow pipeline so i decided to copy a small portion of the database (15 tables) and only bring over some of those tables for example i want to bring only the rows that have a certain id.
But this is not a one time move i need to add all the stuff that is added to the old database added to the new one on an hourly basis. My research has led me to SSIS and that it may have a way of accomplishing this but i have found no clear examples on how it is done if in fact it is possible. Thanks in advance.
I am currently using a database that is poorly designed and a slow pipeline
Share
Yes it is possible . You can schedule your ssis package through sql agent to run on hourly basis .
For a table ,you can drag a Data Flow Task on to the control flow .Inside DFT ,you need to place an oledb Source component ,Lookup ,Data conversion (if the types are different in source and target table) and Oledb destination .
oledb Source component: Create a variable of type string and in the expression write your sql query to fetch the data based on ID.Now use this variable in source component.Lookup: You need to select your source table and combine the primary key column from the source and destination table.It acts similar to inner join query .After combining the primary key from the both the tables ,select the columns which you need from the source .Oledb destination: Simply select your target table and map the columns fromLookup no matched output.If you need to update the values from the source then useLookup matched outputand connect it to an execute SQL task and write the update query .Please go thru the link and SO
Scheduling of SSIS package