CLI

ETLUnit 3.9.6

 

Draft in Progress

This document is a draft and is under development.

 

Description

The CLI, or Command Line Interface provided by ETLUnit is a custom interface based on a shell called ClamShell. 

From your chosen command shell, navigate to the bin/ folder of your project, then type "etlunit."  The ETLUnit-supplied CLI will be invoked.

 

userme@LO-PPBBKK55 /c/src/bi-legacy-qpt/bin (master)
$ etlunit
Project is out of date
Updating meta data . . .
Caching local copy . . .
 .d8888b.  888                         .d8888b.  888               888 888
d88P  Y88b 888                        d88P  Y88b 888               888 888
888    888 888                        Y88b.      888               888 888
888        888  8888b.  88888b.d88b.   :Y888b.   88888b.   .d88b.  888 888
888        888     :88b 888 :888 :88b     :Y88b. 888 :88b d8P  Y8b 888 888
888    888 888 .d888888 888  888  888       :888 888  888 88888888 888 888
Y88b  d88P 888 888  888 888  888  888 Y88b  d88P 888  888 Y8b.     888 888
 :Y8888P:  888 :Y888888 888  888  888  :Y8888P:  888  888  :Y8888  888 888
                                                  Command-Line Interpreter
Java version: 1.7.0_21
Java Home: c:\Java\jdk1.7.0_21-x64\jre
OS: Windows 7, Version: 6.1
userme >

 

 

This is the interface provided for running ETLUnit tests.  Some configuration for the test environment may also be done using one of the available custom commands.  For instance, the profile command will allow you to instantly change the environment for running your test - the number of threads running, what features are installed etc.  (TODO: Complete this link: SEE ETLUnit Test Profiles.)

Go to top

The 'Test' Command

The test command will cause one or more ETLUnit tests to be run.  Usually whole test methods are run.  There is an option to run a certain operation only within a test method.

Core syntax:

test myTest

 

 

Where test is the command and myTest is the test to run

te MyTest

 

Where te is the command and myTest is the test to run.

More Test Command Syntax

For more on test syntax, see CLI.

Go to top

List of All Commands

List of Commands Provided by help Command

You can see a list of available commands by using the help command.

 

mbruton > help
Available Commands
------------------
      exit       Exits ClamShell.
      help       Displays help information for available commands.
   sysinfo       Displays current JVM runtime information.
     sleep       Sleeps for the specified number of seconds
      time       Prints current date/time
list-installed-features       Lists all installed features
       lif       Synonym for list-installed-features
list-available-features       Lists all available features
       laf       Synonym for list-available-features
  describe       Displays meta information about a feature and / or operations
      test       Runs tests
        te       Synonym for test
       set       Displays or sets options for system or for a feature
         s       Synonym for set
    update       Updates external binaries
add-feature       Adds a known feature to the project (listed in list-available-features)
    report       Opens the test report for the last run
         r       Synonym for report
   reports       Opens the test report for the last run
        rs       Synonym for reports
   migrate       Migrates data files from one fml to another
  versions       Prints the version info of all installed bitbucket modules
      open       Opens the project directory in a file window
         o       Synonym for open
   profile       Changes to a specific profile or colon-separated list of profiles.  Similar to u
aven profile).  Leave profile name blank to switch to the default.
         p       Synonym for profile
list-reference-types       Lists all reference type catalogs
       lrt       Synonym for list-reference-types
       tag       Sets the name of the tag to be used for the history for the next run only
        ta       Synonym for tag
verify-reference-types       Verifies all reference type catalogs
       vrt       Synonym for verify-reference-types
mbruton >

 

Go to top

Command Usage

CommandAlias UsageDescription
add-feature  

Usage:

add-feature <name>

Example:

add-feature mysql-database

add-feature log-assertion

Adds a known feature to the project (listed in list-available-features).

<name> required.

describe  

Usage:

describe <feature-name>

describe <feature-name> [<operation>]

Example:

describe informatica

describe database assert

Displays meta information about a feature and/or operations.

<feature-name> required.

<operation> optional.

exit  

Usage:

exit

Exits ClamShell.
help  

Usage:

help

help [<command_name>]

Example:

help describe

Displays help information for available commands.

<command_name> optional.

list-available-featureslaf 

Usage:

list-available-features

laf

Lists all available features. 

COMPARE etlunit.json in your project, the install-features list,

with list of etlunit features among the POM dependencies.

list-installed-featureslif 

Usage:

list-installed-features

lif

Lists all installed features.  SEE etlunit.json in your project.
list-reference-typeslrt 

Usage:

list-reference-types

lrt

Lists all reference type catalogs.  Presents a menu for drill-down.
migrate  

Usage:

migrate

migrate [<namePattern>]

Migrates data files from one FML to another.

<namePattern> optional.   Regular expression of the data set(s) to match.

May not be fully implemented.

openo 

Usage:

open

open [<path>]

Example:

open

open c:\JavaApps

open /etc

Opens a directory in a file window.

If no argument, opens the project root directory.

If <path> is supplied, opens that folder.

<path> optional.  The path should be absolute (begin with root folder).

profilep 

Usage:

profile

profile [<name>]

profile [<name1>:<name2>]

profile [<name>[:...]]

profile -l

p

p [<name>]

p [<name1>:<name2>]

p [<name>[:...]]

p -l

Options:

-l  List current profiles

Example:

profile threads

profile threads:java:simulate

  • Use -l option to list current profile(s) without changing to default
  • <name> is optional.  If more than one, separate with colons.
  • When a name is provided, changes to that profile.
  • When colon-separated list is provided, specified profiles are used.
  • To switch back to default:
    • Leave profile name blank to switch to the default.
    • Provide reserved name "default" to switch back to the default profile.

reportr 

Usage:

report

r

Opens the test report for the last run.

 

reportsrs 

Usage:

reports

rs

Provides list of test reports to choose from.
sets 

Usage:

set [database|etlunit|file|informatica|workspace]

Example:

set

set database

set etlunit

set file

set informatica

set workspace

s

s database

s etlunit

s file

s informatica

s workspace

Displays or sets options for system or for a feature. 

Invokes a menu.

sleep  

Usage:

sleep <time>

Example:

sleep 5

 

Sleeps for the specified number of seconds.
sysinfo  

Usage:

sysinfo (options)

Options:

-cp

-classpath

-mem

-memory

-props

Example:

sysinfo -cp -mem

Displays current JVM runtime information.

Options may be combined.

tagta 

Usage:

tag (tagName)

Example:

tag t1

Sets the recallable tag name to be attached to the next run only.

 

testte 

SEE Test Specification Reference

SEE CLI

Example:

test %testPackage

test @testClass

test #testMethod

test $testOperation

test %testPackage@testClass#testMethod$testOperation

test @|testClass

test %testPackage|

test #|testMethod|

test <tag1>

test <tag1,error>

test [aud]

test [aud,edw]

test {source: 'VW_STORE_HLDY_COMP_GM'}

test {source: 'DAILY_AGG_HLDY',target-schema:'agg'}

te {source:'ID_REF_MINIMAL_EDW1'} or {source-file:'test_file_abc.txt'}

te (@columns_ii| or @sql_iv) or @register_ii|

Runs ETLUnit custom tests.
time  

Usage:

time

Prints current date/time.
update  

Usage:

update

Updates external binaries.
verify-reference-types
vrt 

Usage:

verify-reference-types

vrt

Verifies all reference type catalogs.
versions  

Usage:

versions

Prints the version information of all installed Bitbucket modules.

Go to top