In this article

The page's title should always be the Snap's name.  For example, File Reader. 

Overview

Provide a functional overview of the Snap. Do not mention anything about the Snap's internal technology or techniques. The user should be able to understand what the Snap. Include a screenshot of a well-configured Snap.  

Use this Snap to generate a JSON document for the next Snap in the Pipeline.

Prerequisites

List all prerequisites for using the Snap as a bullet list. Use direct sentences. For example, in case of a Write-type Snap a prerequisite would be that the user must have write access. Include links to external official documentation, if required. Use "None." if there no prerequisites. 

None.

Support for Ultra Pipelines

Retain the applicable one above.

See Snap Support for Ultra Pipelines.

Limitations and Known Issues

List all Snap-specific limitations as a bullet list. Limitations can be imposed by the Snap's development environment and also by the endpoint's API. List both. Use direct sentences. Include links to external official documentation, if required.  

Snap Input and Output

Type of view: Document/Binary/Both. Get number of views from the Views tab in the Snap. List at least three compatible Snaps in each category. Provide a brief of the input/output required. If the input/output is optional then preface the description with "Optional." For example, "Transaction data complying with the Orderful schema as a JSON document."

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document

Retain one.

  • Min: 0
  • Max: 1
  • Mapper Snap
  • Copy Snap
  • Splitter Snap
This Snap can have an upstream Snap that can pass a JSON document in output view. 
Output

Document

Retain one.
  • Min: 1
  • Max: 1
  • Mapper Snap
  • Copy Snap
  • JSON Parser
  • JSON Formatter

This Snap generates a document that contains the expected result along with the original JSON document (when Pass through is enabled).

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelStringN/AJSON Generator
Edit JSONApache Velocity template

Optional. Launches the JSON editor which will allow defining JSON. The editor will load an existing JSON document if it was defined previously. The editor lets you save JSON in SnapLogic's file system or import existing JSON documents from it.

Note that this text is treated as an Apache Velocity template, so you can substitute values from input documents or the pipeline parameters. The Apache Velocity template can be used to pass dynamic values from upstream Snaps. For more information, see

Empty JSON fileFile with JSON content
Process ArrayCheck boxOptional. The Process array property specifies whether or not the Component should take a root JSON array and write each element of the array as a JSON document. SelectedSelected
Pass throughCheck boxOptional. Use this property to pass the data in the input document through to the output document and merge it under the key 'original'. See example for more details.DeselectedSelected
String

Indicates how the Snap must be executed. Available options are:

  • Validate & Execute: Performs limited execution of the Snap (up to 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.

Validate & ExecuteExecute only

Troubleshooting

ErrorReasonResolution
Unexpected character ('{' (code 123))Enter the error message that is displayed. 

The array entries in the JSON file do not follow the syntax. A comma ',' is expected before the beginning of every second array—'{'.

Briefly describe why this error is triggered. An experienced user will be able to troubleshoot the error looking at the reason itself.
Verify the array at the row and column mentioned beside the error message using the Edit JSON feature and add a comma appropriately.

List the steps that the user must take, if necessary, to rectify this error. If a procedure is extensive, add it as a separate section after this table and reference it with a link in this cell.

Editing JSON

Clicking Edit JSON will launch the JSON Editor. The JSON will be stored in the Snap (after clicking OK). The JSON can be exported to SnapLogic's file system using the export action or be imported from there using the import action.

The JSON can be customized to meet specific needs, such as having: 

  1. Static content that produces one output document OR
  2. A list of static documents within an array definition which can then be transformed into multiple documents upstream by using a JSON Splitter Snap OR
     
  3.  Variables in the JSON, which can be substituted with document values from the input view of the Snap.

Escaping Special Characters

Additionally, some special characters can be escaped using the following notations.

Type To pass this valueSpecify
Single characters
$
#[$]# or \$
JSON String
##
#[##]#

For information on how to use pipeline parameters and field values within this Snap, see the "Velocity Templates in Generator Snaps" section of Parameters and Fields.

Examples

Include basic-level examples to demonstrate the various functionalities of the Snap. Examples are different from Use Cases. Example should focus on the Snap in question. Follow the basic template of a use case: Functional overview followed by explanation in an expandable section. Include all SLPs in the Downloads section. Use videos if a Snap's configuration is complex and difficult to capture using screenshots.

Using the Pass Through Functionality

Example title must be gerunds in title case.

Consider the following Pipeline that combines two simple datasets.

Download this Pipeline

Add a download link to the Pipeline in the the "Download" text above. Explain the Pipeline/Snap configuration in detail if a complex enough example has been used. Ensure that the functionality you are trying to illustrate is captured correctly. Include caveats as appropriate.

Snap Configurations

JSON Object (JSON Generator Snap with Pass through disabled)

This JSON Generator Snap, JSON Object, is used as an input by the downstream JSON Generator Snap, Combined JSON.

Snap Configuration (JSON Object)
Input JSONOutput JSON

Combined JSON (JSON Generator Snap with Pass through enabled)

Snap Configuration (Combined JSON)

Input JSONOutput JSON

The output JSON contains:

Downloads

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt. 


See Also

Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.