Skip to content

Transformer

formatting...

Module contains step implementations for the Transformer task.

Parse

Create an instance of the Transformer task.

Transforms the specified content with content_type to an object that an transformer can extract information from with the specified expression.

See Transformer task documentation for more information.

Example

And value for variable "document_id" is "None"
And value for variable "document_title" is "None"
And value for variable "document" is "{"document": {"id": "DOCUMENT_8843-1", "title": "TPM Report 2021"}}"
...
Then parse "{{ document }}" as "json" and save value of "$.document.id" in variable "document_id"
Then parse "{{ document }}" as "json" and save value of "$.document.title" in variable "document_title"

Arguments

Name Type Description Default
content str

contents to parse, supports templating or a static string

required
content_type TransformerContentType

MIME type of contents

required
expression str

JSON or XPath expression for specific value in contents

required
variable str

name of variable to save value to, must have been initialized

required