Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informatica Logic

Status
Not open for further replies.

kpmINFO

IS-IT--Management
Apr 1, 2004
77
US
Can some one advise me on a simple logic how I can achieve it in Informatica

I have a transformation with some data , if one of the port value is "False" I would like to add another port and assign "False" to it for all the rows.

Here is the illustration

data within a transformation
col1 col2 col3
a b true
b c true
d e false

if I find a "False" in the third col I would like to add another column and make it false

col1 col2 col3 col4
a b true false
b c true false
d e false false

I tried this with Mapping variable but this did not work as maopping parameters changes reflect for next session

can some one give me logic to achieve this




How can I achieve this.
 
AFAIK there is no way to use logic to ADD or NOT ADD a port to a transformation. What is possible is to populate a port WITH a value based on some logical structure. So , in your case create a logical structure that checks whether a value of 'FALSE' exists in Column3. If so, then populate the column4 with 'FALSE' else leave empty.

A yes/No view can be build with something like:

Select DISTINCT 'CHECK',
CASE WHEN EXISTS (SELECT COLUMN3 from TABLE WHERE COLUMN3 = 'FALSE') THEN 1 ELSE 0 END
FROM TABLE

This view holds either the value 0 or 1 depending on the existence of one or more values of 'FALSE', along with a dummy value 'dummy'. Now build a lookup on the view and you have a simple logical solution



T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top