DataFrame Tool
Pandas-like data science and ETL in pure Java using JShell with automatic Maven dependency resolution.
Tool ID
dataframe
Credential Required
No
Operations
1. execute — Run Java code in JShell
| Property | Type | Default | Description |
|---|---|---|---|
code |
string | — | Required. Java code to execute in JShell |
libraries |
string | — | XML-formatted Maven dependency declarations |
workingDir |
string | INTOUCH_HOME/tasks/dataframe |
Working directory for execution |
jshellCommand |
string | jshell |
Path to jshell executable |
Maven Dependencies
Specify dependencies using XML format in the libraries property:
<dependency>
<groupId>tech.tablesaw</groupId>
<artifactId>tablesaw-core</artifactId>
<version>0.43.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
Dependencies are:
- Downloaded from Maven Central on first use
- Cached in {workingDir}/lib/ for subsequent runs
- Automatically added to the JShell classpath
Code Environment
- Full Java language support via JShell
returnValuevariable (int) controls exit code — set it to non-zero for warning/failure##intouch[set name=X value=Y]property markers work viaSystem.out.println()- All JShell prompts and noise are filtered from output
Example Code
// Import Tablesaw
import tech.tablesaw.api.*;
import tech.tablesaw.io.csv.*;
// Read a CSV
Table sales = Table.read().csv("/data/sales.csv");
// Filter and aggregate
Table result = sales
.where(sales.stringColumn("region").isEqualTo("East"))
.summarize("amount", AggregateFunctions.sum).by("product");
// Write results
result.write().csv("/data/east_sales_summary.csv");
// Publish a property
System.out.println("##intouch[set name=rowCount value=" + result.rowCount() + "]");
Published Outputs:
- exitCode — JShell exit code
- output — filtered stdout
- Any properties set via ##intouch[set name=X value=Y] markers
Killable
Yes — destroys the JShell process forcibly.
Technology
- JShell — Java REPL (JDK 9+)
- Maven Aether — automatic dependency resolution from Maven Central
- Tablesaw — Java DataFrame library (up to 2 billion rows)
Chaining Patterns
- SQL export → DataFrame — export data to CSV, process with Tablesaw
- DataFrame → SQL import — process data, import results into database
- DataFrame → Email — generate analytics, email results
- DataFrame → PDF — analyze data, generate PDF report
- FTP download → DataFrame — download data files, process them
Use Cases
- Data transformation and ETL
- Statistical analysis and aggregation
- CSV/data file manipulation
- Report generation from structured data
- Any Java library available on Maven Central
Limitations
- Requires JShell (JDK 11+)
- Dependencies must be in Maven Central
- No persistent state between executions
- Local repository cleaned up after each run
- No graphical output (server-side execution)
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
exitCodeoutput