The [error] variable does not persist in an [onAfter] script in a transform map.

Steps to Reproduce


1) create a data source into [sys_user] table with the following sample csv file as attachment:
email,first name,last name,user_name 
Note that the second user has the first user's user_name and this will cause a duplicated key error when inserting. 
2) Create a new transform map:
    a) coalesce on [email] so they are treated as two different records, map the [user_name] to [sys_user].[user_name]
    b) create an new [onAfter] script with the following script:
        log.info('# log.info - OnAfter: Email: '+ source.u_email + ', error: ' + error)
3) Run the import and transform.
4) Expect a duplicated key error.
Expected Results: error variable is printed as [true] 
Actual Results: error variable is printed as [false], the [error] value does not persist.


This is expected behaviour. The [error] variable is not set to true while running the transformation in case of an error. It is available in a script to be able to stop the transformation.


Transformation script variables

Field map script variables


Related Problem: PRB633362

Seen In

Dublin Patch 8

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-02-09 05:39:30