Data Operation - Template

Data Operation - Template

Template

template is an intermediate operation that creates a data resource from a template.

The template:

Arguments

The template operations accept the following arguments.

  • template-selectors - a list of data selectors that selects templates data resources.
  • template-inline - a inline template with the following properties:
  • engine - the templating engine (default to native)
  • granularity: defines the granularity of the execution (Default to resource)
    • record: the template will be processed for each record
    • resource: the template will be processed on all records

Engine

The engine is the process that is responsible to transform a template in a document.

Tabulify supports the following value as engine:

Type

type is the media type of the template. The type default to the type of the template.

Template Match

If the operation has:

Syntax

This operation is a intermediate flow operation

  • Template Selectors
-   name: "Json"
    op: "template"
    args:
        template-selectors:
            - [email protected]
            - [email protected]
  • Inline Json Template
-   name: "Json"
    op: "template"
    args:
        template-inline:
            type: json
            content: |
                {
                    "${group}": {
                        "${item_code}": {
                            "price": "${price}",
                            "description": "${description}"
                        }
                }
Powered by ComboStrap