DataPallas Command Line Interface
Automate report processing with DataPallas's comprehensive command line interface tools.
Table of Contents
- Introduction
- General Syntax
- Main Commands
- Core Operations
- Other Operations
- Connections
- License Management
- Service Management
- JasperReports
- Integration Examples
- Best Practices
Introduction
DataPallas provides a powerful command line interface (CLI) that enables you to automate report processing, integrate with other systems, and schedule tasks. With the CLI, you can execute all core DataPallas functions without using the graphical interface.
The CLI and the REST API are two interfaces to the same engine — both produce identical results. Use the CLI for scripts, cron jobs, and command-line automation. Use the REST API for programmatic integration from other applications.
General Syntax
DataPallas commands follow a consistent structure for easy automation:
datapallas.bat <group> <command> [options] [arguments]On Windows the CLI is datapallas.bat, in the installation folder. Type the .bat extension — plain DataPallas starts DataPallas.exe, the desktop app. In the Docker Server image the same CLI is datapallas.sh.
To display command help information:
datapallas.bat --helpRunning a group without a command prints that group's commands:
datapallas.bat job
datapallas.bat connection
datapallas.bat systemFor version information:
datapallas.bat --versionMain Commands
The CLI includes several primary command categories:
| Command | Description |
|---|---|
job | Job execution operations — burst, generate, merge, resume |
connection | Connection management — list, test-email, test-database, run-sql |
system | System operations — license, service |
jasper | Compile, fill, and export JasperReports (.jrxml) reports |
Core Operations
These are the primary commands for automating report processing.
Burst Command
Split PDF and Excel documents based on burst tokens to create individual output files.
datapallas.bat job burst [options] <input-file>Options:
| Option | Description |
|---|---|
-c, --config <file> | Configuration file path |
-ta, --testall | Test all entries |
-tl, --testlist <list> | Comma separated list of entries to test |
-tr, --testrandom <count> | Number of randomly selected entries to test |
--json | Emit machine-readable JSON instead of human text |
Examples (using sample files that ship with DataPallas):
# Split a PDF into individual payslips (one per employee)
datapallas.bat job burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml
# Split an Excel file by distinct sheets
datapallas.bat job burst samples/burst/Payslips-Distinct-Sheets.xls -c config/samples/split-only/settings.xml
# Dry run — test all recipients without distributing
datapallas.bat job burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml --testall
# Test only one specific recipient
datapallas.bat job burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml --testlist [email protected]
# Test 2 randomly selected recipients
datapallas.bat job burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml --testrandom 2Generate Command
Create reports from data sources using templates. Supports CSV, Excel, TSV, fixed-width files, SQL queries, Groovy scripts, JasperReports, and dashboard configurations.
datapallas.bat job generate [options] <input>The <input> argument is either a file path (for CSV/Excel/TSV input) or a report template name (for SQL/Script/JasperReports data sources where the data comes from the database, not a file).
Options:
| Option | Description |
|---|---|
-c, --config <file> | Configuration file path (required) |
-p, --param <key=value> | Report parameters in key=value format (repeatable) |
-ta, --testall | Test all entries |
-tl, --testlist <list> | Comma separated list of entries to test |
-tr, --testrandom <count> | Number of randomly selected entries to test |
--json | Emit machine-readable JSON instead of human text |
Examples (using sample files that ship with DataPallas):
# Generate DOCX payslips from CSV data
datapallas.bat job generate -c config/samples/g-csv2docx/settings.xml samples/reports/payslips/Payslips.csv
# Generate HTML payslips from CSV data
datapallas.bat job generate -c config/samples/g-csv2htm/settings.xml samples/reports/payslips/Payslips.csv
# Generate PDF payslips from CSV data
datapallas.bat job generate -c config/samples/g-csv2pdf/settings.xml samples/reports/payslips/Payslips.csv
# Generate from SQL query (no input file — data comes from the database)
datapallas.bat job generate -c config/samples/g-sql2htm-cst-stmt/settings.xml g-sql2htm-cst-stmt
# Generate from Groovy script data source
datapallas.bat job generate -c config/samples/g-scr2htm-trend/settings.xml g-scr2htm-trend
# Generate with ad-hoc parameters
datapallas.bat job generate -c config/samples/g-scr2pdf-adhoc/settings.xml g-scr2pdf-adhoc -p "EmployeeID=E001" -p "FirstName=John" -p "LastName=Doe"Other Operations
These commands provide additional utility functions.
Merge Command
Combine multiple PDF documents listed in a text file into a single output file.
datapallas.bat job merge [options] <list-file>The <list-file> is a text file containing one file path per line.
Options:
| Option | Description |
|---|---|
-o, --output <name> | Output file name (defaults to the mergefilename setting, merged.pdf) |
-b, --burst | Burst the merged file |
-c, --config <file> | Configuration file path |
--json | Emit machine-readable JSON instead of human text |
Example:
Create a text file listing the PDFs to merge (one path per line), then:
# Merge three monthly invoice files and burst the result into individual invoices
datapallas.bat job merge merge-list.txt --output merged.pdf --burst -c config/samples/split-only/settings.xmlThe list file is deleted after a successful merge.
Resume Command
Continue processing a previously paused job from its saved progress file.
datapallas.bat job resume <job-progress-file>Connections
Test and query the email and database connections configured under config/connections. The --id is the connection's file or folder name there — for example eml-contact for config/connections/eml-contact.xml, or db-northwind for config/connections/db-northwind/db-northwind.xml.
# List configured connections
datapallas.bat connection list
# Test an email connection
datapallas.bat connection test-email --id eml-contact
# Test a database connection (also caches its schema)
datapallas.bat connection test-database --id db-northwind
# Run a SQL query against a database connection
datapallas.bat connection run-sql --id db-northwind -q "SELECT * FROM Employees"
# Write the result to a CSV file instead of the console
datapallas.bat connection run-sql --id db-northwind -q "SELECT * FROM Employees" --format csv --out employees.csvconnection run-sql accepts --format table|csv|json (default table) and --out <file>. connection list accepts --type email|database.
License Management
datapallas.bat system license activate
datapallas.bat system license deactivate
datapallas.bat system license checkService Management
Manage database starter packs and Docker applications. This is how you start/stop database instances (PostgreSQL, MySQL, ClickHouse, etc.) and apps (Grails playground, Next.js playground, AI Hub, etc.).
datapallas.bat system service <category> <command> [service-name] [args...]The category is database or app.
Examples:
# Start the PostgreSQL Northwind database on port 5432
datapallas.bat system service database start northwind postgresql 5432
# Stop it
datapallas.bat system service database stop northwind postgresql
# Start on a different port (if 5432 is taken)
datapallas.bat system service database start northwind postgresql 5433
# Start the Grails playground app on port 8400
datapallas.bat system service app start grails-playground 8400
# Stop an app
datapallas.bat system service app stop grails-playground
# Start the AI Hub
datapallas.bat system service app start ai-hub-frend 8440The command string is the same whether typed in the CLI or submitted through the REST API — the backend parses and routes it through the same engine.
JasperReports
Compile, fill, and export standalone JasperReports (.jrxml) files. Use this for ad-hoc report generation from .jrxml templates without going through the full report configuration workflow.
datapallas.bat jasper [options]Options:
| Option | Description |
|---|---|
--report-dir <dir> | Folder containing the .jrxml and its resources (required) |
--jrxml <file> | Main .jrxml template filename (required) |
--format <fmt> | Output format: pdf, xlsx, csv, html (required) |
--out <file> | Output file path (required) |
--jdbc-url <url> | JDBC connection URL |
--jdbc-user <user> | JDBC username |
--jdbc-pass <password> | JDBC password |
-p, --params <key=value> | Report parameter as key=value (repeatable) |
Example:
# Compile and export an employee detail report to PDF
datapallas.bat jasper --report-dir ./config/samples-jasper/employee-detail --jrxml employee_detail.jrxml --format pdf --out ./output/employee-detail.pdfTip: All examples above use sample files included with DataPallas — open a terminal in the installation folder and run them directly. Check the
output/folder to see the generated files.
Integration Examples
Windows Batch Scripts
datapallas.bat writes its own output to logs/datapallas.bat.log, and exits with 0 on success, 1 when the job fails and 2 for an invalid command line:
@echo off
REM Process monthly invoices
datapallas.bat job burst ./data/invoices-april-2025.pdf --config ./config/reports/invoices/settings.xml
if %ERRORLEVEL% NEQ 0 (
echo Error processing invoices - see logs\datapallas.bat.log
exit /b %ERRORLEVEL%
)
echo Invoice processing completed successfullyLinux/macOS Shell Scripts
On the Docker Server image, forward the same commands to datapallas.sh inside the container:
#!/bin/bash
# Process monthly reports with parameters
docker compose run --rm datapallas-server datapallas.sh job generate \
--config ./config/reports/monthly-reports/settings.xml \
./data/april-2025.csv \
-p startDate=2025-04-01 \
-p endDate=2025-04-30Output goes to logs/datapallas.sh.log inside the container, not to your terminal.
Best Practices
- Use Configuration Files: Store settings in configuration files for consistent execution.
- Test Before Distribution: Use test options (
--testall,--testlist,--testrandom) to verify results before live processing. - Pass Parameters: Use
-p key=valuewithjob generateto make reports dynamic (date ranges, filters, departments). - Read the Log Files: The CLI writes to
logs/datapallas.bat.log(logs/datapallas.sh.logon the Server image) — that is where command output and errors land. - Check Exit Codes:
0on success,1when the job fails,2for an invalid command line (%ERRORLEVEL%,$?). - Use
--jsonfor Automation: Most commands accept--json, which prints{"status":"ok","details":{...}}or{"status":"error","message":"...","details":{...}}for scripts to parse. - Schedule Regular Jobs: Use your system's task scheduler (cron, Task Scheduler) for recurring jobs.
- Use the REST API for Integration: For programmatic integration from other applications, the REST API provides the same capabilities with structured JSON requests/responses.