Sequence
On this Page
Overview
This Snap is used to generate a sequence of numbers. This sequence can start at any positive or negative integer and continue to provide new numbers by adding the step value to the previously generated number.
The Snap does not require any input. However, if input is passed, it generates a sequence where the number of output documents is equal to the number of input documents.
Input and Output
- Expected input: Optional. A document containing the initial value of the sequence and the increment value that you want to use to create the sequence.
- Expected output: A document containing the sequence generated using the input parameters.
- Expected upstream Snaps: Any Snap that offers documents. For example, JSON Parser, JSON Splitter, or Mapper.
- Expected downstream Snaps: Any Snap that accepts documents. For example, Join, or a combination of JSON Formatter and File Writer.
Prerequisites
None.
Configuring Accounts
Accounts are not used with this Snap.
Configuring Views
Input | This Snap has at most one document input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
- None.
Support
- Works in Ultra pipelines.
Known Issues
- None.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. |
---|---|
Initial value | Required. The initial value of the sequence. Example:
Default value: 1 |
Step value | Required. This property increments (or decrements if negative) the sequence value by this amount to produce the next sequence value.
Default value: 1 |
Number of documents | Required. The number of documents to generate. Example:
Default value: 1 The value in this property is ignored if an input dataset is provided to the Snap. In such cases, the number of documents in the output is equal to the number of documents in the input. |
Pass through | Set this option to determine if input data should be passed through or not. Default value: Not selected |
Snap Execution | Select one of the three modes in which the Snap executes. Available options are:
Default Value: Execute only |
Examples
Sequence Snap without Input
The pipeline, Sequence_Snap_Without_Input_Data, demonstrates a basic Sequence Snap without any input data. Upon execution, the Snap generates a sequence of numbers based on the Snap's settings.
Click here to download this pipeline. You can also downloaded this pipeline from the Downloads section below.
Sequence Snap with Input
The pipeline, Sequence_Snap_with_Input_Data, demonstrates how the Sequence Snap functions when there is an input. Upon execution, the Snap generates a sequence of numbers based on the Snap's configuration. However, the number of records output by the Snap is the same as the number of input records.
Click here to download this pipeline. You can also downloaded this pipeline from the Downloads section below.
Downloads
Important steps to successfully reuse Pipelines
- Download and import the pipeline into the SnapLogic application.
- Configure Snap accounts as applicable.
- Provide pipeline parameters as applicable.