cancel
Showing results for 
Search instead for 
Did you mean: 

How to call Python script having pandas library in snaplogic

RashmiKakkar
New Contributor

Hi Snaplogic team,

I am trying to call python script (using pandas library) in snaplogic. Python script is working fine from python idle . When I am calling it using snaplogic , it is showing error.does it require any installation. Kindly reply ASAP or suggest what should be done

Error2 script.txt (140 Bytes)!

4 REPLIES 4

rbikash7758
New 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).

I am running a ground plex.

Can you please suggest me a way how i can install it on ground plex ?

sys.path.append() can be used to import external jars (Java / Jython) to a script that you may have in place.

Steps:

  1. 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>/…)
  2. If you have multiple node(s) dedicated to run the SnapLogic service, repeat Step (1) for all nodes
  3. 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).

Jump
Employee
Employee

To use Pandas and other Python libraries, we recommend Remote Python Script Snap which is part of ML Core Snap Pack. To use this Snap, it is required to have Remote Python Executor
(RPE) installed. The RPE can be installed on the same node as JCC or somewhere else where JCC can reach. We also have Jupyter Notebook Integration which let you code / validate pipeline in Jupyter Notebook and publish the script back to SnapLogic pipeline.

We also have some tutorials that use this Snap which are in here.
Below is the list:
Handwritten Digit Recognition using Convolutional Neural Networks
Iris Flower Classification using Neural Networks
Natural Language Processing using TextBlob
Speech Recognition with DeepSpeech
Image Recognition using Inception-v3