Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Snap type:

Read

 

Description:

This Snap generates JSON as a document for the next Snap in the pipeline. It is often used at the beginning of a pipeline to create a file. The file size has a limit of 16 MB for JSON.

 

Prerequisites:

[None]

 

Support and limitations:

 

Account: 

Accounts are not used with this Snap.

 

Views:


InputThis Snap has at most one document input view.
OutputThis Snap has exactly one document output view.
Error

This Snap has at most one document error view and produces zero or more documents in the view.

If the Snap fails with an error in the JSON, an error document is sent to the error view containing the fields error, original, and templateOutput:

 

Code Block
{
    "error": "Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: JSON Generator; line: 4, column: 2]",
    "original": null,
    "templateOutput": "\n[\n    {\n{\n    }\n]\n\n\n"
  }

 

Settings

Label

 

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.

Edit JSON

 

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. See the following URL for more information about Velocity:
https://velocity.apache.org/engine/devel/user-guide.html

Process array 

Required. The Process array property specifies whether or not the Component should take a root JSON array and writes each element of the array as a JSON document. 

Example: Selected 

Default value: Selected 

 

...