Skip to main content

correlate

relampo correlate analyzes a YAML file, detects reusable dynamic values, and can generate a correlated YAML output.

Purpose

Use relampo correlate when you need to:

  • identify dynamic values reused across requests
  • review correlation candidates before changing the script
  • apply correlation changes into a new YAML file
  • export candidate output as JSON (--json)

Before you start

  • You need an input YAML file previously recorded with Relampo.
  • Correlation is effective when the recorded script includes requests and responses.
  1. Analyze candidates with table output.
  2. Tune confidence threshold (--min-confidence) when needed.
  3. Apply all candidates (--apply) or selected groups (--apply-ids).
  4. Validate and execute the resulting YAML with run.

Analyze candidates

Default analysis output (table):

relampo correlate test.yaml

Lower threshold to show more candidates:

relampo correlate test.yaml --min-confidence 0.0

Higher threshold to keep only stronger matches:

relampo correlate test.yaml --min-confidence 0.9

Optional: export candidates as JSON:

relampo correlate test.yaml --json

Apply correlations

Apply all detected candidates:

relampo correlate test.yaml --apply

Apply all candidates and write to a custom output:

relampo correlate test.yaml --apply -o test.correlated.yaml

Apply only selected table candidate IDs:

relampo correlate test.yaml --apply-ids "1-3,5" -o test.partial.correlated.yaml

--apply-ids accepts comma-separated IDs and ranges (for example: 1,2,5 or 1-4,7).

Input behavior

  • With a YAML argument, correlate uses that file.
  • Without an argument, correlate tries to reuse the last input saved by previous runs:
relampo correlate

If there is no saved previous input, the command returns an error.

What Relampo does during execution

When running correlate, Relampo:

  • validates input availability
  • parses YAML and scans request/response flow
  • detects candidates
  • prints table output (default) or JSON (--json)
  • writes correlated YAML when apply mode is used

Output file behavior

  • If -o/--output is provided, Relampo writes to that path.
  • If you use --apply and do not pass -o/--output, Relampo automatically generates this output name:

<input>.correlated.yaml

Example:

  • input: test.yaml
  • default output: test.yaml.correlated.yaml

Minimal examples

relampo correlate test.yaml
relampo correlate test.yaml --apply
relampo correlate test.yaml --apply-ids "1,3,7"

Common errors

  • Input file not found.
  • No YAML argument and no previous correlate input saved.
  • Invalid --apply-ids format or IDs out of range.
  • Output path not writable.
  • Script without recorded responses to correlate.

Next command

After generating the correlated file:

relampo run test.yaml.correlated.yaml