One Star

Division in a tMap

what's the problem, exactly?
4 REPLIES
Community Manager

Re: Division in a tMap

Hi
Don't use the 'Test' button, open the code tab to see whether there are compilation error in the generated code. If you want to see the execution result, link a tLogRow after tMap and execute the job.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Division in a tMap

thanks!
As you suggested, I have added tLogRow to the job design.
But, Why this error occured? Please assist me.
Exception in component tMap_1
java.lang.NullPointerException
at tbmd_spot_ord.tbmd_bydd_bnd_prc_valu_0_1.TBMD_BYDD_BND_PRC_VALU.tFileInputPositional_1Process(TBMD_BYDD_BND_PRC_VALU.java:2551)
at tbmd_spot_ord.tbmd_bydd_bnd_prc_valu_0_1.TBMD_BYDD_BND_PRC_VALU.tOracleConnection_1Process(TBMD_BYDD_BND_PRC_VALU.java:456)
at tbmd_spot_ord.tbmd_bydd_bnd_prc_valu_0_1.TBMD_BYDD_BND_PRC_VALU.runJobInTOS(TBMD_BYDD_BND_PRC_VALU.java:3628)
at tbmd_spot_ord.tbmd_bydd_bnd_prc_valu_0_1.TBMD_BYDD_BND_PRC_VALU.main(TBMD_BYDD_BND_PRC_VALU.java:3492)
One Star mpa
One Star

Re: Division in a tMap

idb008,
This means one of the input columns has a NULL value where it shouldn't. I'm guessing it's column8 but i don't know since I don't know your job.
When the columns needs to do some kind of calculation and it contains a null value u will get errors.
If the problem is your column 8, replace your calculation by the following:
row1.NewColumn8 == null ? 0 : ( row1.NewColumn8 / 100 )
This should resolve your error.
Regards
One Star

Re: Division in a tMap

Thanks mpa. It worked!