Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS look up task

Author  Topic 

Unikhath
Starting Member

12 Posts

Posted - 2008-08-21 : 15:29:50
Hi,

Can any body explain me when should we use the look up transformation and what is the result after the transfom. Its really confusing me with the conditional split. If look up is used for matching the data in the data base y not use the conditional split and check the data??
Any help is appreciated..

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-22 : 02:30:21
they are used for different purposes.
Conditional Split actually enables us to check some condition on the data and then process the data accordingly using seperate outputs. As example consider case where we want to check if value of flag is Yes and put them on one table and if No put in another table. Here is where we use conditional split. It checks the data coming through dataflow and redirects it to appropriate output path based on flag value.
lookup transformation on other hand enables us to lookup one of our field value against another table field value and then if it finds matching record return matching data from other table along with current data. As an example consider case where we have Employee_ID in our data and needs to get Name of employee by looking into Employee table based on ID value. here we will use Lookup transformation. Also we can take many actions here based on outcome of lookup. Three options are available.
1.Fail Component
2.Ignore Failure
3.Redirect Row
first one will fail the package whenever it cant find matching row in lokup table for any id value in our data
second one will ignore the lookup failure and continue with next record
final option will help us to distinguish the ones which didnt had a matching value by saving them to table or recordset by providing an error output path.
Go to Top of Page

Unikhath
Starting Member

12 Posts

Posted - 2008-08-22 : 11:15:50
Thanks for the detail explanation. I have one confusion to be cleared yet. The redirect row in the error output redirects the table data that did not match my criteria in the look up. And the data that matched my criteria can be sent down into the transformation. Please let me know this is what you meant there.

Thanks once again.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-22 : 13:45:39
quote:
Originally posted by Unikhath

Thanks for the detail explanation. I have one confusion to be cleared yet. The redirect row in the error output redirects the table data that did not match my criteria in the look up. And the data that matched my criteria can be sent down into the transformation. Please let me know this is what you meant there.

Thanks once again.


Yup. Exactly. The errored rows can be captured by attcahing the redirect output path (denoted by red line) to flat file or table or recordset. This can be then cleansed and brought back to your table or discarded.
Go to Top of Page

Unikhath
Starting Member

12 Posts

Posted - 2008-08-28 : 14:56:04
Thanks, the detail explanation really helped me out.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-28 : 14:59:30
You will complete picture from this:

http://www.sqlis.com/311.aspx
Go to Top of Page
   

- Advertisement -