Ask Your Question

Referring to a runtime resource with Jython

asked 2018-03-06 22:30:33 -0500

davidha gravatar image

updated 2018-03-13 15:58:19 -0500

metadaddy gravatar image

I am performing data load in cluster batch mode, since runtime parameter is not supported by Cluster batch mode, we went for Runtime Resource instead.

We figured out we can refer to a runtime parameter in Jython by sdcFunctions.pipelineParameters()["parameter"], however there seems to be no document about how to reference a run time resource in Jython. Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-13 15:57:30 -0500

metadaddy gravatar image

You can load the content of the pipeline resource into your Jython script using the ${runtime:loadResource(<file name>, <restricted: true | false>)} EL function. For example:

record.value['f'] = '${runtime:loadResource('myfile', false)}'

Data Collector will insert the content of the runtime resource file before running the script.

edit flag offensive delete link more


Thank you for the information! Is there any documentation link to refer for this usage because I just have difficulties finding how it can be done previously.

davidha gravatar imagedavidha ( 2018-03-14 20:47:47 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-03-06 22:30:33 -0500

Seen: 131 times

Last updated: Mar 13 '18