Upload
vam1
View
216
Download
0
Embed Size (px)
Citation preview
8/8/2019 mapplets
http://slidepdf.com/reader/full/mapplets 1/2
When the server runs a session using a mapplets, it expands the mapplets. The server
then runs the session as it would any other sessions, passing data through each
transformations in the mapplet.
If you use a reusable transformation in a mapplet, changes to these can invalidate the
mapplet and every mapping using the mapplet.
You can create a non-reusable instance of a reusable transformation.
Mapplet Objects:
(a) Input transformation
(b) Source qualifier
(c) Transformations, as you need(d) Output transformation
Mapplet Won’t Support:
- Joiner
- Normalizer - Pre/Post session stored procedure
- Target definitions
- XML source definitions
Types of Mapplets:
(a) Active Mapplets - Contains one or more active transformations(b) Passive Mapplets - Contains only passive transformation
Copied mapplets are not an instance of original mapplets. If you make changes to the
original, the copy does not inherit your changes
You can use a single mapplet, even more than once on a mapping.
Ports
Default value for I/P port - NULL
Default value for O/P port - ERROR
Default value for variables - Does not support default values
In one our my projects.. we have error stretagy which is applicable for all the mappings..
That will capture the error records and flag them and attach error msg to the error records
and writing to the error table. this the logic common for all the mappings.. so weimplemented this logic in MAPPLETS
this example any one and any domain can tell as example of mapplet..
8/8/2019 mapplets
http://slidepdf.com/reader/full/mapplets 2/2
We are routing the error records based on the key coloumns null or null values.. what are
the scenarios we thought errors.. we capture those as errors and sending the only error records to the Mapplet input..
In Mapplet, we are converting single row into multiple rows if that records contains more
then one error.. example one row had three errors we are creating three records out of itand showing three errors for the same record.
example.. empno name date sal101 praveen 12/12/1999 10000
Null pavan 33/13/1990 afdsfdsfds
in the above example we have three errors.in second record. empno is null, date is invaliddate, sal is not valid.. so what will do is we generate row number for each input records to
identify which record had error. so our output in the error file like this
rowid tablename error field error msg2 emp empno empno null
2 emp date date invalid2 emp sal invalid salary.
In Mapplet..
Mapplet Input---> Expression---> UnconnectedLookup--> Mapplet output
actuall mapplet will do only segregate the errors and assign the error code and lookup onerror msg table based on the error code and assign the error messages to the each error
and also error count for each record in expressoin based on tat we will mention occurs
option in normalizer to split single row into multiple rows.