Overview
Etlworks includes built-in support for Python as a scripting language. This allows teams who prefer Python syntax to write inline scripts in places where Etlworks normally uses JavaScript.
This built-in Python support is powered by Jython, which runs inside the Etlworks runtime. Jython provides Python 2.7 compatibility but does not support installing or importing third-party Python packages.
Built-in Python is suitable for lightweight scripting, small expressions, and logic embedded inside flows and mappings.
It is not intended for running full Python programs, data processing libraries, or modern Python 3 code.
For running real Python programs, installing packages, using virtual environments, and orchestrating Python-driven pipelines, use the Execute Script Local or Remote via SSH flow. More specifically: read how run Python scrips.
Built-in Python (Jython) vs real Python
Built-in Python (Jython)
Runs inside Etlworks (embedded, sandboxed)
-
Python version: 2.7
-
Cannot install packages with pip
-
Cannot import Python modules like pandas, numpy, boto3, etc
-
Supports importing Java classes
-
Suitable for simple logic inline with Etlworks flows
-
Used the same way as JavaScript in mapping, conditions, and scripting steps
Real Python via Execute Script Local or Remote via SSH
Runs as a full external Python interpreter (Python 3)
-
Supports installing packages using pip
-
Supports virtual environments
-
Supports Python 3 and all modern libraries
-
Supports running full programs
-
Works locally or on remote hosts
-
Fully replaces Airflow PythonOperator and BashOperator
-
Recommended for teams doing significant Python development
If your goal is to run Python scripts with packages or perform Python-driven orchestration, use Execute Script Local or Remote via SSH.
Built-in Python is only for simple inline logic.
Where built-in Python is available
Jython-based Python can be used anywhere Etlworks provides a scripting field:
-
In the Execute JavaScript or Python flow
-
In Mapping, to calculate field values
-
In scripting transformations (before row, after row, for each row)
-
In conditions and loop conditions inside a nested flow
-
In exception handlers, Execute before, and other scripting fields
When selecting a scripting language in these fields, you can choose between JavaScript (recommended) and Python.
JavaScript is the default and recommended scripting language for most use cases.
How to write built-in Python scripts
Step 1. Open the scripting editor
Click Open in Editor near any scripting text area.
Step 2. Choose Python
In the editor, click Select Language and choose Python.
Step 3. Write Python 2.7 code
Enter your Python script.
Example:
value = row.get("amount") * 1.2
scriptResult.setResult(value)
Importing Java classes into Python
Jython allows Python scripts to import and use any Java class that is available to Etlworks.
Example:
from org.jsoup import Jsoup
from com.toolsverse.etl.core.task.common import FileManagerTask
from com.toolsverse.util import TypedKeyValue, Utils
from java.util import ArrayList
This is the main advantage of Jython inside Etlworks: it integrates directly with Java APIs.
Returning values from Python
To return a value from Python (for example in mapping or condition scripts), set:
scriptResult.setResult(the_value)
This differs from JavaScript, where the last evaluated expression is returned automatically.
When to use built-in Python
Use built-in Python for lightweight tasks:
-
Simple field transformations
-
Inline conditional logic
-
Small loops and validations
-
Scripts that interact with Java APIs
-
Logic that must run inside Etlworks without external dependencies
If you need Python for anything more advanced, switch to the recommended approach below.
Running real Python code
To run real Python code with full capabilities, use: Execute Script Local or Remote via SSH
This flow allows you to:
-
Use Python 3
-
Install any package using pip
-
Use virtual environments
-
Run complete Python programs
-
Access files on the local server
-
Execute code on a remote machine via SSH
-
Run long-running or daemon processes
-
Replace Airflow-style operators for Python, Bash, and shell automation
This is the correct solution when teams want to use Python as their primary development and orchestration tool.
Summary
-
Etlworks includes built-in Python (Jython), which supports Python 2.7 and no third-party packages.
-
Built-in Python is meant for simple inline scripting and conditional logic inside the Etlworks UI.
-
For full Python development, Python 3, pip packages, and orchestration, use Execute Script Local or Remote via SSH.
-
Both options will continue to work. Built-in Python remains available for teams that prefer its syntax, but the recommended modern approach is to run Python externally using the script executor flow.