cancel
Showing results for 
Search instead for 
Did you mean: 

Python Script Advice

AnilD
New Contributor

Hi Team,

we have a python script which works outside Snaplogic as expected.  We would like to use same code in Snaplogic.

can anyone suggest how can we use same code and achieve our use case.pleasei suggest other that the Script snap if any.

Thank you 

1 REPLY 1

koryknick
Employee
Employee

Welcome to the Community @AnilD!  

My standard advice for developers new to SnapLogic is to look at rewriting your Python code using standard SnapLogic snaps.  It's a good learning experience to learn how to effectively use the platform and you have much more supportable code in the long term. 

I assume that the thought process is that you have your scripts that work in Python and the Script snap supports Python, so "why not just plug it in and move on?"; unfortunately, the Script snap has a specific ScriptHook interface that must be implemented to execute within a SnapLogic pipeline, doesn't offer highly robust error messaging, and has specific external library implementations that may not be supported by your server admins.

If you want to continue using your Python scripts as-is, my recommendation is to use your enterprise scheduling tool to run the Python scripts directly (outside SnapLogic) and implement your other app/data integrations in SnapLogic.