Decompress

You can use this Snap to decompress the content of binary data. For example, if a File Reader Snap is configured to read a compressed file, you can use this Snap to decompress the content before passing the data to a Parser Snap. The decompression scheme can be explicitly chosen or automatically detected based on the content of the binary data. If the compression scheme is set to AUTO and the incoming data is not compressed, the raw input data is passed through without any changes.

Warning: This Snap only uncompresses the compressed files on the first level. It does not decompress the archived folders which are located at the second level and deeper. This Snap supports decompression of the following compression schemes:
  • GZIP
  • BZIP2 (or BZ2)
  • DEFLATE
  • ZIP
  • 7ZIP


Snap views

View Description Examples of upstream and downstream Snaps
Input (binary) The input view accepts a document containing binary data that needs to be decompressed. This is typically compressed file content that you want to extract or decompress before further processing.
Output (binary) The output view provides the decompressed file content in the specified decompression format. The Snap supports multiple decompression schemes.

The decompressed file in the specified decompression format:

  • AUTO
  • BZIP2
  • GZIP
  • DEFLATE
  • ZIP
  • 7ZIP
Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: Decompress

Example: Decompress
Scheme Dropdown list Required. Specify the decompression scheme to use. The available options include:
  • Auto - Automatically detects the decompression scheme to be applied (based on the compression scheme) on the incoming documents. This scheme supports ZIP and 7z.

  • Bzip2 - Decompresses files compressed in the BZIP2 compression scheme.

  • Gzip - Decompresses files compressed in the GZIP compression scheme.

  • Deflate - Decompresses files compressed in the DEFLATE compression scheme.

  • ZIP - Decompresses files compressed in the ZIP compression scheme.

  • 7z - Decompresses files compressed in 7z compression scheme.

Note: Supported schemes for AUTO Scheme

AUTO scheme detection is supported for DEFLATE, GZIP, BZIP2, ZIP, and 7z compression schemes.

Default value: AUTO

Example: BZIP2

Snap execution Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

Example: Validate & Execute

Examples