Ask a question
Quick access
- outside home
- Explore user forums
- Frequently asked questions
Find related threads
- Remove from my forums
Answered by:
Archived Forums 361-380
>
SQL Server Integration Services
Questions
-
Sign in to vote
Hello experts,
I am working on SSIS 2008,
The SQL table is the source and destination.
The task is to load data from the source to the destination, if it matches, update the destination table and no match, then insert into the destination table.I took the OLEDB source which refers to the source table,
- Storage, destination table Conatin..
-If the lookup data does not match "DO NOT MATCH", I insert it into the destination tablemy demand: IF it matches, I will insert these entries into the TEMP table.
I know we can use ##TEMP table in SSIS,
Make sure to keep the same connection property on TRUE
and Delay Validation TRUE..But how could I insert MATCH data coming from LOOKUP into table ##Temp,
What approach and transformation should I use?
The above approach doesn't work because I can't see the temp table to load MatchData? Also above this DataFlow I taskI have created the Execute SQL task to create a table ##temp.. HELP?- Edited by Rihan8585 Friday 1 November 2013 at 06.25
Friday, November 1, 2013 06:14
Answer
-
Sign in to vote
I want to update the match data in the destination table and insert data that does not match.
A few days ago I read an article aboutWWW.SQLservercentral.comdvshttp://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/102924/
SEE Option 3 (INSERT THEN UPDATE)
Where you requested to load match data into temp table and then use temp table to update target table match data...(Performance will be faster compared to OLEDB command.)
I don't want to use the OLEDB command because the performance is worse and I have approx. 46 million rows coming from the source.
NOTE: I can't create \ am not allowed to create a temp \ fitness table, I want to use the temp ## table so as not to increase the number of tables in my database.Since the source data has 46 million records and I'm assuming the same large number will be in the destination table to lookup, this approach won't be efficient. I would suggest the following:
- load the source data into the raw/stage table.
- use the T-SQL MERGE statement to upsert between the final destination table and the raw/staging table.
Tak, hsbal
- Marked as answer by mike yin Sunday, November 17, 2013 1:53 PM
Tuesday, November 5, 2013 4:28 PM
-
POINT 2)
I can't use t-sql MERGE statement because my source and destination table are in different databases and I don't want to HARDCODE the database name with the table name in T-sql Merge, that's why I'm looking for an SSIS solution.Why don't you want to use the database name in the 2 part naming? This is absolutely correct and can be done.
ENT 1)
USE RAW\STAGING TABLE: This is my question, how to create a temporary table to load MATCH data coming from SEARCH? So I can use this temporary table to UPDATE THE MATCH DATA in the DESTINATION TABLE.I said this may not be efficient because the Find component will have to store all the target records in memory and then identify the delta. This step will be less efficient if the destination table has millions of rcds and LOOK Up is not worth using for me.
Tak, hsbal
- Marked as answer by mike yin Sunday, November 17, 2013 1:53 PM
Thursday 7 November 2013 at 20.05
All the answers
-
Sign in to vote
Hola
in the ssis package you have 2
1-you can use recordset.
RecordSet should use variable and
The variable will be a data type object.
2- you can use Raw File Destination.
Friday November 1, 2013 at 09:36
-
Sign in to vote
Could you explain it more? or another solution to this?
Tuesday 5 November 2013 at 06.02
-
Sign in to vote
Hi Rihan,
from my understanding you have to create the temp table structure first, then you have to load data into the temp table.
Please try the link below, it might fix the error you are getting.
o
http://sqlscrapbook.wordpress.com/2010/07/14/load-data-into-a-temp-table-using-ssis/
So,
Tuesday 5 November 2013 at 08.08
-
Sign in to vote
Hello Anil,
Thanks for the reply..If you go through my entire thread, I already mentioned that I took the Execute SQL task to create the temporary table and set the required properties like "Keep same connection" and "Delay validation".
Althoughafter creating temp table ## in EExcute SQL task before data flow taskCan't see temp table ## for LOAD MATCH The data in the temp table came from LOOKUP.
IMAGE is only to give the idea of requirement..
Some help?Tuesday, November 5, 2013 08:47
-
Sign in to vote
May I ask the reason for the temp table? What will you use the data in this temporary table for?
Tuesday 5 November 2013 at 09.08
-
Sign in to vote
I want to update the match data in the destination table and insert data that does not match.
A few days ago I read an article aboutWWW.SQLservercentral.comdvshttp://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/102924/
SEE Option 3 (INSERT THEN UPDATE)
Where you requested to load match data into temp table and then use temp table to update target table match data...(Performance will be faster compared to OLEDB command.)
I don't want to use the OLEDB command because the performance is worse and I have approx. 46 million rows coming from the source.
NOTE: I can't create \ am not allowed to create a temp \ fitness table, I want to use the temp ## table so as not to increase the number of tables in my database.
- Edited by Rihan8585 Tuesday 5 November 2013 at 09.55
Tuesday, November 5, 2013 09:52
-
Sign in to vote
Have you considered using a Raw file as the destination?
Tuesday 5 November 2013 16:15
-
Sign in to vote
I want to update the match data in the destination table and insert data that does not match.
A few days ago I read an article aboutWWW.SQLservercentral.comdvshttp://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/102924/
SEE Option 3 (INSERT THEN UPDATE)
Where you requested to load match data into temp table and then use temp table to update target table match data...(Performance will be faster compared to OLEDB command.)
I don't want to use the OLEDB command because the performance is worse and I have approx. 46 million rows coming from the source.
NOTE: I can't create \ am not allowed to create a temp \ fitness table, I want to use the temp ## table so as not to increase the number of tables in my database.See AlsoWhy Microsoft is bundling all of its data analytics products into FabricCách triển khai tải delta ổn định - yaicoSince the source data has 46 million records and I'm assuming the same large number will be in the destination table to lookup, this approach won't be efficient. I would suggest the following:
- load the source data into the raw/stage table.
- use the T-SQL MERGE statement to upsert between the final destination table and the raw/staging table.
Tak, hsbal
- Marked as answer by mike yin Sunday, November 17, 2013 1:53 PM
Tuesday, November 5, 2013 4:28 PM
-
Sign in to vote
Another problem you will run into when using a destination table is that lookups are deadlocks, this is especially true for large data sets. It would create a lookup cache in memory of the target instead of doing a direct lookup in the table.
Tuesday, November 5, 2013 4:38 PM
-
Sign in to vote
Since the source data has 46 million records and I'm assuming the same large number will be in the destination table to lookup, this approach won't be efficient. I would suggest the following:
- load the source data into the raw/stage table.
- use the T-SQL MERGE statement to upsert between the final destination table and the raw/staging table.
Tak, hsbal
Hello, Harry,
thanks for the reply
POINT 1)
USE RAW\STAGING TABLE: This is my question, how to create a temporary table to load MATCH data coming from SEARCH? So I can use this temporary table to UPDATE THE MATCH DATA in the DESTINATION TABLE.POINT 2)
I can't use t-sql MERGE statement because my source and destination table are in different databases and I don't want to HARDCODE the database name with the table name in T-sql Merge, that's why I'm looking for an SSIS solution.Wednesday 6 November 2013 at 06.27
-
Sign in to vote
POINT 2)
I can't use t-sql MERGE statement because my source and destination table are in different databases and I don't want to HARDCODE the database name with the table name in T-sql Merge, that's why I'm looking for an SSIS solution.Why don't you want to use the database name in the 2 part naming? This is absolutely correct and can be done.
ENT 1)
USE RAW\STAGING TABLE: This is my question, how to create a temporary table to load MATCH data coming from SEARCH? So I can use this temporary table to UPDATE THE MATCH DATA in the DESTINATION TABLE.I said this may not be efficient because the Find component will have to store all the target records in memory and then identify the delta. This step will be less efficient if the destination table has millions of rcds and LOOK Up is not worth using for me.
Tak, hsbal
- Marked as answer by mike yin Sunday, November 17, 2013 1:53 PM
Thursday 7 November 2013 at 20.05
-
Sign in to vote
I have exactly the same question and no one has given a direct answer to this:\ - how to transport match data to a temp table using dest OLEDB...
Tuesday February 27, 2018 at 11:08