Core Plugins and tasks TemplatedTask

Core Plugins and tasks TemplatedTask

Certified

Render and run a task from a templated spec.

Renders a YAML task definition from spec using Pebble and executes it. The rendered task must be a RunnableTask and cannot itself be TemplatedTask.

Useful for highly dynamic task definitions driven by inputs or previous outputs.

yaml
type: io.kestra.plugin.core.templating.TemplatedTask
yaml
id: templatedtask
type: io.kestra.plugin.core.templating.TemplatedTask
id: templated_task
namespace: company.team
variables:
  property: uri
  value: https://kestra.io
tasks:
  - id: templated_task
    type: io.kestra.plugin.core.templating.TemplatedTask
    spec: |
      type: io.kestra.plugin.core.http.Download
      {{ vars.property }}: {{ vars.value }}
Properties

The templated task specification