You are on page 1of 1

Flat File with NULLS in the output

ITtoolbox as adapted from Informatica-L discussion group Summary: I have a flat file as show below: Year MONTH1 MONTH2 MONTH3 2007 10 20 30 I need the output as: Year MONTH1 MONTH2 MONTH3 2007 10 NULL NULL 2007 10 20 NULL 2007 10 20 30 Full Article: Disclaimer: Contents are not reviewed for correctness and are not endorsed or recommended by ITtoolbox or any vendor. Popular Q&A contents include summarized information from ITtoolbox Informatica-L discussion unless otherwise noted.
8/3/2007 By ITtoolbox Popular Q&A Team for

1. Adapted from a response by datta on 8/3/2007 In Normaliser use 4 fields 1)year occurs 1 2)month1 occurs 3 3)motnh2 " 4)month3 " Connect year to year i/p port in nrm Cnnct month1 to month1(1) i/p Cnnct month1, month2 to month2(1),month2(2) i/p in norm rsply Cnnct month1, month2, month3 to month3(1) ,month3(2),month3(3) i/p in norm rsply 2. Adapted from a response by mukesh_kummar on 8/3/2007 1.Take 3 instances of source 2.Union it in union t/f 3.Pass all o/p to expression t/f There create a variable say x ---- = x+1 (must come before then these conditions) iif(x>0,MONTH1) iif(x>1,MONTH2,NULL) iif(x>2,MONTH3,NULL) 4. Pass year to resp o/p i.e year port of o/p and above those to resp. ports.i.e MONTH1,MONTH2,MONTH3