TransformIO Modes

TransformIO has with three modes of execution:

  1. Desktop Graphic User Interface (GUI).
  2. Terminal Text User Interface (TUI).
  3. Command Line Interface (CLI).

Graphical User Interface (GUI)

Patrodyne-ETL-TransformIO-GUI.png

The TransformIO GUI is the easiest way to create/edit a batch, view/edit source data, view the target data or review the output log. The user interface has four windows and menus:

  • batch - left window, an XML editor to create or edit configure a batch.
  • source - right top window to view or edit source data.
  • target - right bottom window to view target data.
  • console - bottom window to review the output log.

The menu bar has seven drop-down menus:

  • File - Create a New batch. Open, Save or Close a current batch. Exit the application.
  • Edit - Undo, Redo, Cut, Copy, Paste or set Preferences.
  • Transform - Debug or Run the current batch.
    • Debug - Executes the batch in-memory.
    • Run - Executes the batch and outputs to the target location.
  • Source - Wrap mode, Edit mode, Save, Refresh data.
  • Target - Wrap mode. Blank (clear) the target window.
  • Console - Wrap mode. Blank (clear) the console window. Display available scripting engines.
  • Help - Online, Donate, (hot) Keys, About.

Textual User Interface (TUI)

Patrodyne-ETL-TransformIO-TUI.png

Often, headless servers are used for batch processing because they are streamlined, inexpensive and reliable. Or, home users may use a terminal (ssh) to access their Network Attached Storage (NAS) servers. In these cases, TransformIO's Textual User Interface (TUI) is a convenient way to maintain TIO batches.

To install TransformIO on a headless server, download the installer to your server and run it in console mode:

java -jar patrodyne-etl-TransformIO-#.#.#-install.jar -console

Welcome to the installation of TransformIO #.#.#!
 - Patrodyne <rick.osullivan@patrodyne.org>
The homepage is at: http://patrodyne.org/sites/etl-TransformIO
press 1 to continue, 2 to quit, 3 to redisplay
Select target path [~/opt/Patrodyne/patrodyne-etl-TransformIO/#.#.#] 
press 1 to continue, 2 to quit, 3 to redisplay
[ Starting to unpack ]
[ Processing package: Core (1/3) ]
[ Processing package: Logger (2/3) ]
[ Processing package: Logback (3/3) ]
[ Unpacking finished ]
Install was successful
application installed on ~/opt/Patrodyne/patrodyne-etl-TransformIO/#.#.#
[ Console installation done ]

The TUI uses CHARVA to display a full screen user interface when you are working in remote terminal.

CHARVA is a Java framework for presenting a "graphical" user interface, composed of elements such as windows, dialogs, menus, text fields and buttons, on a traditional character-cell ASCII terminal.

The CHARVA Java library is included with the TransformIO distribution but the CHARVA native library is not included; fear not, it is easy to build the native library for your system using the instructions on their download site.

When TransformIO is run in TUI mode but cannot find the CHARVA library you will be instructed to build the native library, as follows:

$ TransformIO.sh mode=tui

no Terminal in java.library.path
Please build 'CHARVA: A Java Windowing Toolkit for Text Terminals'
from http://www.pitman.co.za/projects/charva/index.html
and copy libTerminal.so or Terminal.dll to:
lib/native

Note: The lib/native path is relative to your TransformIO installation path. The default location is:

${HOME}/opt/Patrodyne/patrodyne-etl-TransformIO/#.#.#/lib/native

Command Line Interface (CLI)

After you have configured a batch using the GUI or TUI, you can run the batch from the command line. The CLI is the best way to repeatedly run the same TIO batch. This is also the way you would schedule batch jobs using CRON or any other scheduler.

$ TransformIO.sh mode=CLI egs/02ReverseLastAndFirstName/batch.tio 

INFO  options: TransformIO 1.0.0-SNAPSHOT
INFO  batch=egs/02ReverseLastAndFirstName/batch.tio
INFO  mode=CLI
INFO  Source: file:egs/02ReverseLastAndFirstName/input.txt
INFO  Target: file:egs/02ReverseLastAndFirstName/output.txt
INFO  Transform: START
DEBUG Record: 1
DEBUG Record: 2
DEBUG Record: 3
INFO  Transform: SUCCESS (3, 0.667 ms)