Unix Execute

In this article

Overview

You can use Unix Execute Snap to transfer data files from SSH to a remote machine and execute tasks.

Snap Type

The Unix Execute Snap is a Write-type Snap that writes data to a remote machine.

Prerequisites

None.

Limitations

  • The Unix commands are OS-level commands. If you want to run the RMstar command, and if that star is in the root directory, the command deletes that root directory because the JCC has delete permissions.

  • The Unix Snap runs in JCC with the associated JCC privileges. However, you cannot limit the permissions.

Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 0

  • Max: 1

  • Mapper

  • Copy

  • JSON Splitter

Each document contains data in JSON format.

Output

Document

  • Min: 0

  • Max: 1

  • JSON Generator

  • Mapper

Each document contains corresponding response in JSON format.

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

  • Asterisk ( * ): Indicates a mandatory field.

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

  • Expression icon ( ): Indicates 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.

  • Upload icon ( ): Indicates that you can upload files.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

Default Value: 30
Example: 60

String

Specify a unique 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.

Command*

Default Value: N/A
Example: Merge Leads

String/Expression

Enter the command to write data files and execute tasks.

Fail on non-zero exit status

Default Value: deselected

Checkbox

Select this checkbox to fail the Snap when the exit status is non-zero.

Execute during preview

Default Value: deselected

Checkbox

Select this checkbox to execute the Snap during the Save operation so that the output view can produce the preview data.

Snap Execution

 

Default Value: Execute Only
Example: Validate & Execute

Dropdown list

Specifies the execution type:

  • Validate & Execute: Performs limited execution of the Snap (up to 2000 records based on Preview doc count, default is  50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.

  • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.

  • Disabled: Disables the Snap and, by extension, its downstream Snaps.

Snap Pack History