?
Solved

How to validate lookup transformations conditionally?

Posted on 2009-02-16
5
Medium Priority
?
503 Views
Last Modified: 2013-11-10
In my source file, I have a lookup field that needs to be validated against the ID of the lookup table in the database.
The source lookup field may contain nulls since the destination table field has nullable property set.
1. How do I validate my source lookup field for only the not null data?
2. If the source look up field value does not match with the data in the database lookup table, how do I assign a default value to the source lookup field?

Please suggest.

Thanks.
0
Comment
Question by:dorsun
  • 3
  • 2
5 Comments
 
LVL 22

Assisted Solution

by:PedroCGD
PedroCGD earned 750 total points
ID: 23650220
Follow the pipeline in the attached image.
Helped?
regards,
Pedro
www.pedrocgd.blogspot.com
SSIS-Lookup-Redirect.JPG
0
 

Author Comment

by:dorsun
ID: 23650393
Thanks Pedro,

I will follow the way you suggest.
Can yo uplease let me know how would the flow look like if I have more than one lookup fields to validate from the source file?

Thanks,
Dorothy
0
 
LVL 22

Accepted Solution

by:
PedroCGD earned 750 total points
ID: 23650554
After the union all add other lookup and do the same to redirect the rows.
Also take a look to a post in my blog:
http://pedrocgd.blogspot.com/2008/04/dear-friends-today-i-will-describe.html
Helped?
regards,
pedro
0
 

Author Comment

by:dorsun
ID: 23803212
My requirement is :
I need to validate the lookup field.
If the lookup value is not valid, I need to log it in an error table and make the source field value to null.
Also I need to output all the records (even the recors with null lookup value)
Can you please help me out in this process?
0
 

Author Closing Comment

by:dorsun
ID: 31547338
Thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question