Navigation

literal

On this page

Definition

literal

Explicitly defines the documents to output from the stage.

You can only use the literal action in the first stage of a pipeline.

The literal action stage has the following syntax:

{ "service": "", "action": "literal", "args": {"items": [ <document1>, ... ]} }

The literal action has the following argument:

Argument Type Description
items array of documents Documents to output. Documents can reference variables (%%vars) defined in the stage.

Example

Consider the following pipeline of one stage:

[
  {"service": "", "action": "literal", "args": {"items": [{"x": 5, "y": 10}, {"x": 10, "y": 10}]}}
]

Stage1: The literal stage outputs the following documents:

{"x": 5, "y": 10}
{"x": 10, "y": 10}
←   expr namedPipeline  →