Forum Discussion
rbikash7758
7 years agoNew Contributor III
Hi Rashmi ,
you can call external scripts using the Script snap and importing the jython equivalent libraries into the plex. This is supported only if the client is running a groundplex (Not cloudplex).
ayush_vipul
7 years agoNew Contributor III
I am running a ground plex.
Can you please suggest me a way how i can install it on ground plex ?
- sriram7 years agoFormer Employee
sys.path.append() can be used to import external jars (Java / Jython) to a script that you may have in place.
Steps:
- Place a copy of the package / .jar file that you intend to use as part of the script in a directory on the Groundplex node (say under: /opt/snaplogic/<DIR_FOR_EXT_JARS>/…)
- If you have multiple node(s) dedicated to run the SnapLogic service, repeat Step (1) for all nodes
- Update your script in the “Script” snap to import the external library as follows:
import sys
.
.
sys.path.append(’/opt/snaplogic/<DIR_FOR_EXT_JARS>/sample.jar’)
.
.Note: The above method would work only for a “Script” snap based pipeline execution(s) done on Groundplex node(s).