Decompress

The Decompress transformation step enables the decompression of designated archived files as part of a route. To add a Decompress transformation step to a Route Package Template, take the following steps:

  1. Designate file filtering.
  2. Determine whether or not to proceed with route execution on step failure.
  3. Select decompression options.
  4. Determine post transformation actions.
Note Step 1 is mandatory. All other steps are optional.

The following topics provide configuration details for the Decompress transformation step:

Related topics:

Input Files

The Input Files settings consist of the selection Process only result from preceding step and determining the Name Filter.

Process only result from preceding step

When Process only result from preceding step is enabled only files produced by the preceding step will be used as input for this step.

When Process only result from preceding step is disabled or this is the first step all current working files will be used as input for this step.

Note The Name Filter settings will also be applied on a given set of input files.

Name Filter

The Name Filter can either be set to process all files forwarded by the selection of Process only result from preceding step or process files based on a designated filename pattern forwarded by the selection of Process only result from preceding step. If Process all files is selected, all files forwarded by the selection of Process only result from preceding step are processed. If Process files based on a filename pattern is selected, only the files that match the file globbing or regular expression pattern are processed.

Filename patterns

Filename pattern matching supports glob and regexp syntax expressions.

When the designated pattern type is File Globbing then the String representation of the filename is matched using a limited pattern language that resembles regular expressions but with a simpler syntax. For example:

  • Matches files ending in .xml.

    *.xml

  • Matches file names starting with foo. that have a double character extension.

    foo.??

  • Matches file names ending in .1, .2, .3, .4, .5, .6, .7, .8, .9, .0.

    *.[0-9]

  • Matches file names having a single character extension different from 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.

    *.[!0-9]

When the designated syntax is Regular Expression then the String representation of the filename is matched against a Perl5.003 regular expressions. Perl5 extended regular expressions are also supported. For example:

  • Matches files ending in .xml or .txt.

    .*\.(xml|txt)

  • Case insensitive match of data.xml file.

    (?i)data\.xml

Collision settings

The Collision settings determine how an archive containing a file with the same name is handled.

The following options are available:

  • Fail operation - Default setting. A file with the same name as the archive prevents its extraction; an error is reported, and the step fails.
  • Replace existing file - When set, the archive member is extracted into a file with the same name, and the archive is deleted.
  • Rename existing file - When set, name collisions are resolved automatically by appending (new copy <number>) to the extracted archive member that shares its name with the archive. The archive name remains unchanged.
    For example:
    • When an archive named myFile contains a file named myFile, the archived file will be renamed to myFile (new copy 1).
    • If a file with a name myFile (new copy 1) already exists, the extracted file will be renamed to myFile (new copy 2).

Proceed with route execution on step failure

If Proceed with route execution on step failure is checked, the route execution continues even if the step execution fails.

Archive Password

Archive Password consists of entering and confirming the archive password if Password for a protected file is selected.

Note Password protection is only available for the ZIP compression algorithm.

The decompression algorithms supported are:

  • ZIP
  • JAR
  • GZIP
  • TAR

The decompression algorithm is auto-detected at runtime.

All tar.gz archives require two separate Decompress steps. The first one to extract the tar from gzip archive and the second one to decompress the gzip archive.

Note Compressed files are flat-decompressed (no directory structure is recreated).

If there is a file with the same name in different folders inside the archive, only one of them is extracted.

For example:

If an archive.zip file contains two folders (folder1 and folder2) and each of the folders contains a file named file.txt (folder1\file.txt and folder2\file.txt), only one copy of file.txt is extracted.

Password for a protected file

If Password for protected file is selected, enter the archive password.

Confirm the password

If Password for protected file is selected, confirm the archive password.

Post transformation action

The output file names will be the same as the input file names. To change the file names use a Rename transformation step. To configure a Rename transformation step, refer to Rename.

Related Links