vectordotdev/vector · error
Transform is missing
Error message
Transform {transform_key} is missing What it means
After finding the `transforms` mapping, `wrap_transform` looks up the single component key inside it. If the `transforms` mapping is empty or contains no value under the extracted key (e.g. it holds a scalar or null), it reports that the named transform is missing.
Solutions
- Ensure the `transforms` mapping contains an entry whose key is the transform's identifier with a full config mapping as its value.
- Remove empty placeholder `transforms:` sections from example files.
- Confirm the transform key in the YAML matches the component name used elsewhere (e.g. for `inputs` wiring).
Example fix
// before
transforms: {}
// after
transforms:
my_transform:
type: remap
source: ". = ." Defensive patterns
Strategy: validation
Validate before calling
const t = root.transforms;
const keys = Object.keys(t ?? {});
if (keys.length !== 1 || t[keys[0]] === null || typeof t[keys[0]] !== 'object') {
throw new Error('transforms must contain exactly one component key with a full config mapping');
} Type guard
function hasTransformEntry(transforms) {
const entries = Object.entries(transforms ?? {}).filter(([, v]) => v !== null && typeof v === 'object');
return entries.length >= 1;
} Prevention
- Never commit empty placeholder `transforms:` sections.
- Ensure the transform key inside the mapping matches the component identifier used for wiring.
When it happens
Trigger: The `transforms:` section exists but is empty, or `transforms.<transform_key>` is null/a non-mapping that `mapping_value` cannot resolve to the declared key.
Common situations: A placeholder `transforms:` with no entries was committed; the key inside `transforms` was renamed but the check still expects the mapping-key match; YAML typo producing a null value under the key.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- has no component identifier
- Sink example has no sinks section
- Sink is missing
- Source example has no sources section
- Source output has no name
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/ee9aef538c32cd7e.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/check/component_examples.rs:219
YamlValue::Mapping(sinks),
);
Ok(YamlValue::Mapping(root))
}
fn wrap_transform(component_yaml: &YamlValue, component: &Value) -> Result<Option<YamlValue>> {
let Some(source) = validation_source(component) else {
return Ok(None);
};
let root = yaml_mapping(component_yaml, "transform example")?;
let transforms = yaml_mapping(
mapping_value(&root, "transforms")
.ok_or_else(|| anyhow!("Transform example has no transforms section"))?,
"transform example transforms",
)?;
let transform_key = mapping_key(&transforms, "transform example")?;
let mut transform = yaml_mapping(
mapping_value(&transforms, &transform_key)
.ok_or_else(|| anyhow!("Transform {transform_key} is missing"))?,
"transform configuration",
)?;
transform.insert(
YamlValue::String("inputs".to_owned()),
yaml_list(["_validate_source"]),
);
let named_outputs = route_outputs(&transform);
let mut sinks = Mapping::new();
if named_outputs.is_empty() {
sinks.insert(
YamlValue::String("_validate_sink".to_owned()),
blackhole(&transform_key),
);
} else {
for output in named_outputs {
sinks.insert(
YamlValue::String(format!("_validate_sink_{output}")),View on GitHub (pinned to bdb87aeaa4)