Unique

Unique

In this article

 

Overview

You can use this Snap to eliminate duplicate documents in a document stream, such as duplicate rows in a CSV file. Learn more about deduplicating the records.

unique-snap-overview.png

Snap type

The Unique Snap is a Transform-type Snap.

Support for Ultra tasks

Does not support Ultra tasks.

Snap views

Type

Format

Number of views 

Examples of upstream/downstream Snaps

Description

Type

Format

Number of views 

Examples of upstream/downstream Snaps

Description

Input

Document

Min: 1

Max: 1

Any Reader Snap followed by any File Parser Snap.

 

Document input, likely with duplicate data.

Output

Binary

Min: 1

Max: 1

Any file Formatter Snap followed by a Writer Snap.

Unique document data.

Error

Binary

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 while 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 the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the 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

Field / Field set

Field type

Description

Field / Field set

Field type

Description

Label



String

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.


Default value: Unique
ExampleDeduplicate Emp IDs

Minimum memory (MB)





String/Expression

If the available memory is less than this property value while processing input documents, the Snap stops to fetch the next input document until more memory is available. This feature is disabled if this property value is 0.

Default value: 500
Example750

Minimum free disk space (MB)



 

String/Expression

If the free disk space is less than this property value, the Snap stops processing input documents until more free disc space is available. This feature is disabled if this property value is 0.


Default value: 500
Example750

Out-of-resource timeout (minutes)



 

String/Expression

If the Snap pauses longer than this property value while waiting for more memory available, it throws an exception to prevent the system from running out of memory or disk space.


Default value: 30
Example20

Snap Execution




Dropdown list

Select 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

 

Example

Remove duplicate records

The following example pipeline demonstrates how to use the Unique Snap to process employee data from a CSV file and remove duplicate records. The data includes employee information such as ID, name, department, location, hire date, and email address.

ex-unique-pipe-overview.png
  1. Configure the CSV Generator Snap to generate a CSV dataset containing employee records with fields for employee_id, first_name, last_name, department, location, hire_date, and email. The dataset includes multiple duplicate records.

csv-with-duplicate-data.png
  1. Configure the Unique Snap to remove duplicate employee records from the dataset, ensuring each record appears only once.

  2. On validation, you can view all unique records in the output preview as shown below.

    image-20250530-161147.png

Downloads

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

  File Modified

File Example-Unique Snap-pipeline.slp

Jun 03, 2025 by Kalpana Malladi

 

Snap Pack History