text/compose

Built-in compose adapter for records of any type: its manifest, needs, provides, config keys, cost, and an example step

What you'll learn

You're about to put text/compose in a step and want its keys, fields, credentials, and cost before plan tells you.

  • what the adapter needs and provides
  • every with: key it accepts
  • what it costs and which credential it demands

A built-in compose adapter for records of any type: it needs the step's uses: fields and declares no fields of its own. It publishes no per-record estimate, so plan prints ?, and it demands no credential.

Manifest

KeyValue
idtext/compose
version1
rolecompose
entity typeany type
credentialsnone
cost estimate per recordnot published

Needs

The fields the step's uses: line names, and nothing else.

Provides

The fields the step's provides: line declares.

Config keys

The keys with: accepts. Plan rejects any other key.

KeyTypeRequiredWhat it sets
ofstringThe referent (ADR-048): the field whose value this step is about. Injected by the runner from the step-level of: key — never authored inside with:.
providesobjectThe step's derived provides schema (ADR-033): exactly one field, the rendered text. Injected by the runner from the step-level provides: key — never authored inside with:.
templatestringyesThe template rendered once per record over record.* (the uses:/of: fields) and config.* (ADR-057); the result is the one field provides: declares. The runner loads {file:} before validation.

Example

From A pipeline is a YAML file:

- id: subject
  use: text/compose
  uses: [full_name, company_name]
  provides: [subject]
  with:
    template: "{{ record.full_name }}, a note for {{ record.company_name }}"

Used in