*FORMAT VALUES *

Formats values from a key-value response by applying a printf-style template to a specified key. Use this worker to rename, wrap, or reformat a single extracted value from a key-value map before passing it downstream.

When to use

Classification: process.

Tagged: format, keyvalue, printf, process, string_formatting, template, transformation.

Inputs

Label ID Type Default Required Description
Response To Extract From responsetoextractfrom keyvalue   Key-value response object to extract the target value from; leave empty if the value will be supplied directly via the key name field.
Key Name key_name scalar %s   Printf-style format string (e.g. ‘%s’) used to select and/or reformat the key’s value from the input response; defaults to ‘%s’ which returns the value unchanged.

Outputs

Label ID Type Description
keyvalue_formatter_output_1 keyvalue_formatter_output_1 keyvalue Key-value object containing the formatted result, ready for use in downstream workflow steps.

Disciplines

  • data.dataset.transform

Runnable example

A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=keyvalue_formatter


Auto-generated from transformation schema. Worker id: keyvalue_formatter. Schema hash: 4ae0b2e06d25. Hand-curated docs in workerexamples/ override this page when present.