Ask Your Question

How can I check if a field exists in the Jython Evaluator?

asked 2019-05-03 08:20:50 -0600

streamhada gravatar image

updated 2019-05-03 09:54:57 -0600

metadaddy gravatar image


I am trying to do a data tranformation with the Jython Evaluator Processor, the problem i am facing is that :


this line of code is working fine if in the data I am receiving I have the column "Level", and it failing when it s not received.

How can i check if the column "Level" exist before calling it ?

Thank You saad

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-03 09:51:05 -0600

metadaddy gravatar image

You can test for the existence of a field with in:

if 'level' in record.value['http']['results'][ind]['study'][i]:
edit flag offensive delete link more


Perfect , it s working thank you a lot

streamhada gravatar imagestreamhada ( 2019-05-03 10:24:55 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-03 08:20:50 -0600

Seen: 547 times

Last updated: May 03 '19