CSV Generator

In this article

Overview

You can use this Snap to generate a new CSV document for the next Snap in the pipeline.

Variables in the CSV, such as $name or $email are the variables that are retrieved through the input view of the Snap during execution. You can map these variables by using an upstream Data or Structure Snap.

Snap Type

CSV Generator Snap is a Read-type Snap that reads or generates a new CSV document for the next Snap in the Pipeline.

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Input 

Document

 

  • Min: 1

  • Max: 1

  • Mapper

  • CSV Formatter

Output

Document

 

  • Min: 1

  • Max: 1

  • Mapper

  • CSV Formatter

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

  • 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.

Limitations and Known Issues

None.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the field set.

  • Remove icon (): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

Default ValueCSV Generator
ExampleCSV_Generator_temp

String

Specify a unique name for the Snap.

Edit CSV*

 

Button

Click the button to launch the CSV editor to define a CSV document. The editor loads an existing CSV document if you have defined it earlier. You can save the CSV file in SnapLogic's file system or import an existing CSV document from it. Learn more about editing CSV document.

Ensure that the CSV document header contains non-empty values for all columns.

You can customize the CSV:

  • To generate static content that produces one output document.

  • To set variables in the CSV that can be substituted with document values from the input view of the Snap.

Snap Execution

Default ValueValidate & Execute
Example: Execute only

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.

Editing CSV document

  1. Click Edit CSV to launch the CSV Editor. 

  2. Edit the CSV file as required.

  3. Click Ok.
    The JSON document is stored in the Snap.

Options in CSV Editor

The following table describes the numbered callouts in the image:

Callout Number

Option

Description

Callout Number

Option

Description

1

Hide whitespace

Hides the whitespace in the output that you may have in the CSV input document.

3

Export

Export the JSON document to SnapLogic's file system (SLFS)

4

Import

Import a JSON document from your local directory or SLFS.


Snap Pack History

Related Links