Vous êtes sur la page 1sur 3

NORMALIZER TRANSFORMATION

Active and Connected Transformation. The Normalizer transformation normalizes records from COBOL and relational sources, allowing us to organize the data. Use a Normalizer transformation instead of the Source ualifier transformation when we normalize a COBOL source. !e can also use the Normalizer transformation with relational sources to create multi"le rows from a single row of data. Example 1: To create # records of ever$ em"lo$ee in %&' ta(le. %&' will (e source ta(le. Create target ta(le Normalizer)&ulti"le)*ecords. Structure same as %&' and datat$"e of +,*%-AT% as .A*C+A*/. Create shortcuts as necessar$. Creating Mapping : 0. O"en folder where we want to create the ma""ing. /. Clic1 Tools 23 &a""ing -esigner. 4. Clic1 &a""ing23 Create23 5ive name. %67 m) Normalizer)&ulti"le)*ecords #. -rag %&' and Target ta(le. 8. Transformation23Create23Select %6"ression23 5ive name, Clic1 create, done. 9. 'ass all "orts from S )%&' to %6"ression transformation. :. Transformation23 Create23 Select Normalizer23 5ive name, create ; done. <. Tr$ dragging "orts from %6"ression to Normalizer. Not 'ossi(le. =. %dit Normalizer and Normalizer Ta(. Add columns. Columns e>ual to columns in %&' ta(le and datat$"e also same. 0?. Normalizer doesn@t have -AT%T,&% datat$"e. So convert +,*%-AT% to char in e6"ression tAf. Create out"ut "ort out)hdate and do the conversion. 00. Connect "orts from %6"ression to Normalizer. 0/. %dit Normalizer and Normalizer Ta(. As %&'NO identifies source records and we want # records of ever$ em"lo$ee, give OCCU* for %&'NO as #.

04.

0#. Clic1 A""l$ and then OB. 08. Add lin1 as shown in ma""ing (elow7 09. &a""ing 23 .alidate 0:. *e"ositor$ 23 Save &a1e session and wor1flow. 5ive connection information for source and target ta(le. *un wor1flow and see result. Example 2: To (rea1 rows into columns Source: *oll)Num(er Name %N5 +,N-, &AT+S 0?? 0?0 0?/ Target : *oll)Num(er 0?? 0?? 0?? 0?0 0?0 0?0 0?/ 0?/ 0?/

Amit

:<

:9 :< =<

=? <: :=

*ahul :9 Cessie 98

Name Amit Amit Amit *ahul *ahul *ahul Cessie Cessie Cessie

&ar1s :< :9 =? :9 :< <: 98 =< :=

&a1e source as a flat file. ,m"ort it and create target ta(le. Create &a""ing as (efore. ,n Normalizer ta(, create onl$ 4 "orts *oll)Num(er, Name and &ar1s as there are 4 columns in target ta(le. Also as we have 4 mar1s in source, give Occurs as 4 for &ar1s in Normalizer ta(.

Connect accordingl$ and connect to target. .alidate and Save &a1e Session and wor1flow and *un it. 5ive Source Dile -irector$ and Source Dile name for source flat file in source "ro"erties in ma""ing ta( of session. See the result.

Vous aimerez peut-être aussi