Ask Your Question

How can we reuse a javascript function in multiple stages?

asked 2019-10-04 07:56:04 -0500

Kumar gravatar image

I have functionality which I want to call from multiple javascript elevator stages. So where should i place that functionality code in streamsets so that I can call from multiple stages.

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-04 09:35:43 -0500

iamontheinet gravatar image


Create a module, make it available in the path, and import ("require") it in the processors. Just like you would any other external library. Might also want to refer to this --

var myModule = require('myModule');

var myModuleInstance = new myModule();

Cheers, Dash

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-04 07:56:04 -0500

Seen: 151 times

Last updated: Oct 04 '19