Skip to main content

resolve_config_refs

Function resolve_config_refs 

Source
pub fn resolve_config_refs(cfg: &mut PipelineConfig) -> CliResult<()>
Expand description

Resolve every ${vars.X}, ${sources.X.PATH}, ${sinks.X.PATH} token found in a parsed PipelineConfig.

Order:

  1. Resolve ${vars.X} references inside the vars block itself (with cycle detection), so vars-referencing-vars works.
  2. Substitute ${vars.X} inside pipeline.sources.* / pipeline.sinks.* template bodies, plus the legacy singular pipeline.source / pipeline.sink configs. This snapshot becomes the basis for ${sources.X.PATH} / ${sinks.X.PATH} lookups.
  3. Walk every other string location in the config and resolve both ${vars.X} and ${sources/sinks.X.PATH}. ${row_id.path} tokens are passed through verbatim for runtime resolution.

The legacy singular pipeline.source / pipeline.sink are visible under the template name default for ${sources.default.config.X} / ${sinks.default.config.X} lookups.