Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
context-name
context-name
context-name:

  • TODO: Fix link
  • Compare to context-name in the stage operation.

...

  • An object (key-value pairs).
  • These become system properties that become available to the Java class when it is executed.
  • TODO: Make this code accessible? There is sample code in the java-samples module of the etlunit-specific-examples project on Bitbucket.

...

  • The java-executor feature must be configured for your project.
    • The default file for defining your project's configuration is etlunit.json, located in folder src/test/resources/config.
    • You may also place the configuration information in another file, (e.g., java.json) so that you can run your Java tests in another profile.  In this case the profile name would be "java."  TODO: Fix link. SEE the ETLUnit Test Profiles page for more information about profiles.
  • At a minimum, your profile configuration file must declare java-executor as one of the installed features of your project.
Section
Column
width25px

 

Column
width500px
Panel
bgColor#E0E6F8
titleColor#0B0B61
titleBGColor#CED8F6
titleetlunit.json

{

"install-features": ["java-executor"],

"features": {}

}

Column

 

  • TODO: Make this code accessible? There is sample code in the java-samples module of the etlunit-specific-examples project on Bitbucket.
  • Place your Java source code under folder src/main/java.  You may use packages if you wish.
  • ETLUnit will execute a Java class only if it has a main method.
  • When you run a Maven compile or package on your project, binaries for Java classes you wrote will be written to target/classes.  Package structure will be maintained.
  • Out-of-the-box, ETLUnit will only be able to find your Java classes when the tests are run by Maven from the command line.  Running an ETLUnit test from Maven looks like the following:

...

  • If you can recognize it, the test name is preceded by the pound sign ("#"), which is part of the command line syntax to run a test method (contrast this with the syntax to run a test package, a test class, or an operation).  Not all special symbols used in the CLI will work in the context of the Maven test command.  TODO: Fix link. SEE the ETLUnit CLI page for more information on running tests from the ETLUnit command shell.
  • That said, you can run Java classes from the command shell if you manually reconfigure the batch file that starts the command line interface ("CLI").
  • There are two batch files that are used to start the shell.  They both reside in folder bin/ under your project root. 
    1. Batch file "etlunit" will be invoked when your command shell is a Unix-like shell, like BASH. 
    2. Batch file "etlunit.bat" will be invoked when your command shell is the Windows command shell.

...

The assert operation's source-reference-file-type property narrows the count of columns that will be compared with the target to just two.

TODO: Make this project accessible? This example is from the sql-database-samples module of the etlunit-specific-examples project in Bitbucket.

...

execute() for Java Executable Example

TODO: Make this code accessible? SEE the java-samples module of the etlunit-specific-examples project in Bitbucket.

...