Versions Compared

Key

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

...

  1. Open the target file type.
  2. Process the column list on the target file type.  This is the file type which drives the entire operation.
  3. Verify that the reference file type (the type created in (2)) is exactly a subset of the source file type.  If it isn't, an error is thrown.
  4. Compare both the source and the target using the reference file type from (2).

File Assertions

 This part requires a little more explanation.  This is what a minimal file assertion looks like in < 3.2.0:

Code Block
languagejava
titleminimal-file
linenumberstrue
assert(file: 'name');

What this means is to compare a file named 'name', which is the output of some job, to a local file also named 'name'.  Here is a complete example:

Code Block
languagejava
titlefile-assertion-full
linenumberstrue
assert(
	file: 'name',
	target-file-name: 'target',
	source-reference-file-type: 'src',
	target-reference-file-type: 'tgt'
);

Hopefully this illustrates the problem.  Here, with target-file-name specified, file refers to the expected data file, what etlunit calls the target, and target-file-name refers to the actual file, what etlunit refers to as the source.  Beyond that, though, since the file assertion shares it's implementation with the database assertion, the two file types, source and target, refer to target-file-name and file, respectively.