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
- Service Management
- JasperReports
- System & Maintenance
- 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 <command> [options] [arguments]To display command help information:
DataPallas --helpFor version information:
DataPallas --versionMain Commands
The CLI includes several primary command categories:
| Command | Description |
|---|---|
burst | Split documents into individual files based on burst tokens |
generate | Create reports from data sources (CSV, Excel, SQL, Groovy scripts, dashboards) |
resume | Continue processing previously paused jobs |
document | Perform operations like merging multiple documents |
jasper | Compile, fill, and export JasperReports (.jrxml) reports |
service | Manage database starter packs and Docker apps |
system | Execute system-level operations (test connections, license management) |
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 burst [options] <input-file>Options:
| Option | Description |
|---|---|
-c, --config <file> | Path to configuration file |
-p, --params <key=value> | Pass parameters (repeatable) |
-ta, --testall | Test all entries (no distribution) |
-tl, --testlist <list> | Comma-separated list of entries to test |
-tr, --testrandom <count> | Number of randomly selected entries to test |
Examples (using sample files that ship with DataPallas):
# Split a PDF into individual payslips (one per employee)
DataPallas burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml
# Split an Excel file by distinct sheets
DataPallas burst samples/burst/Payslips-Distinct-Sheets.xls -c config/samples/split-only/settings.xml
# Dry run — test all recipients without distributing
DataPallas burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml --testall
# Test only one specific recipient
DataPallas burst samples/burst/Payslips.pdf -c config/samples/split-only/settings.xml --testlist [email protected]
# Test 2 randomly selected recipients
DataPallas 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 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> | Path to configuration file (required) |
-p, --params <key=value> | Pass parameters (repeatable) |
-ta, --testall | Test all entries (no distribution) |
-tl, --testlist <list> | Comma-separated list of entries to test |
-tr, --testrandom <count> | Number of randomly selected entries to test |
Examples (using sample files that ship with DataPallas):
# Generate DOCX payslips from CSV data
DataPallas generate -c config/samples/g-csv2docx/settings.xml samples/reports/payslips/Payslips.csv
# Generate HTML payslips from CSV data
DataPallas generate -c config/samples/g-csv2htm/settings.xml samples/reports/payslips/Payslips.csv
# Generate PDF payslips from CSV data
DataPallas 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 generate -c config/samples/g-sql2htm-cst-stmt/settings.xml g-sql2htm-cst-stmt
# Generate from Groovy script data source
DataPallas generate -c config/samples/g-scr2htm-trend/settings.xml g-scr2htm-trend
# Generate with ad-hoc parameters
DataPallas 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 document 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 (default: merged.pdf) |
-b, --burst | Burst the merged file after merging |
-c, --config <file> | Configuration file (required when using -b) |
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 document merge merge-list.txt --output merged.pdf --burst -c config/samples/split-only/settings.xmlResume Command
Continue processing a previously paused job from its saved progress file.
DataPallas resume <job-progress-file>Service 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 service <category> <command> [service-name] [args...]Examples:
# Start the PostgreSQL Northwind database on port 5432
DataPallas service database start northwind postgresql 5432
# Stop it
DataPallas service database stop northwind postgresql
# Start on a different port (if 5432 is taken)
DataPallas service database start northwind postgresql 5433
# Start the Grails playground app on port 8400
DataPallas service app start grails-playground 8400
# Stop an app
DataPallas service app stop grails-playground
# Start the AI Hub
DataPallas 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 jasper [options]Options:
| Option | Description |
|---|---|
--report-dir <dir> | Directory containing the .jrxml file |
--jrxml <file> | The .jrxml file name |
--format <fmt> | Output format (pdf, xlsx, html, csv) |
--out <file> | Output file path |
Example:
# Compile and export an employee detail report to PDF
DataPallas jasper --report-dir ./config/reports-jasper/employee-detail --jrxml employee_detail.jrxml --format pdf --out ./output/employee-detail.pdfSystem & Maintenance
These commands assist with setup, troubleshooting, and connection testing.
Testing Connections
# Test an email connection
DataPallas system test-email --email-connection-file ./config/connections/eml-contact.xml
# Test a database connection and fetch its schema
DataPallas system test-and-fetch-database-schema --database-connection-file ./config/connections/db-northwind-postgres/db-northwind-postgres.xml
# Test a SQL query against a connection
DataPallas system test-sql-query --database-connection-file ./config/connections/db-northwind-postgres/db-northwind-postgres.xml --sql "SELECT * FROM Employees"License Management
DataPallas system license activate
DataPallas system license deactivate
DataPallas system license checkOther
# Submit a feature request
DataPallas system feature-request -f ./feature-request.txtTip: 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
@echo off
REM Process monthly invoices
DataPallas burst --config ./config/reports/invoices/settings.xml ./data/invoices-april-2025.pdf
if %ERRORLEVEL% NEQ 0 (
echo Error processing invoices
exit /b %ERRORLEVEL%
)
echo Invoice processing completed successfullyLinux/macOS Shell Scripts
#!/bin/bash
# Process monthly reports with parameters
./DataPallas generate \
--config ./config/reports/monthly-reports/settings.xml \
./data/april-2025.csv \
-p startDate=2025-04-01 \
-p endDate=2025-04-30
if [ $? -ne 0 ]; then
echo "Error generating monthly reports"
exit 1
fi
echo "Monthly reports generated successfully"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=valueto make reports dynamic (date ranges, filters, departments). - Create Log Files: Redirect command output (
>,2>&1) to log files for record-keeping and troubleshooting. - Check Exit Codes: Verify command success (
%ERRORLEVEL%,$?) in automated scripts to handle errors. - 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.