Mapping Script Samples
This sample mapping script evaluates the account and entity columns and assigns a value for the target column. It also shows how to update the other columns of the current row using the fdmResult map:
#----------------------------------------------------------------# Sample Jython Mapping Script. Script evaluates account and entity# columns and assign value for the target column. In addition it # also shows how to update the other columns of current row usingfdmResultMap#------------------------------------------------------------------account = fdmRow.getString("ACCOUNT")entity = fdmRow.getString("UD1")# Map based on account and dept column valuesfdmResultMap["ATTR1"] = account + "-" + entityif (account[0:2] == "71"): fdmResult = "7110"elif (account[0:2] == "72"): fdmResult = "7210"elif (account[0:2] == "77" and entity == "205"): fdmResult = "7710" fdmResultMap["AMOUNTX"] = 0else: fdmResult = "7310"This sample script uses the SQL CASE statement to conditionally process assigned values for the target column.
#-------------------------------------------------------------------# Sample SQL script. Script uses SQL CASE statement to conditionally# process assign value for the target column. #------------------------------------------------------------------- CASE WHEN ACCOUNT LIKE '61%' AND ud1 = '205' THEN '6110' WHEN ACCOUNT LIKE '61%' AND ud1 = '240' THEN '6120' ELSE '6130'END