copy (Source)

When To Use

Use copy to duplicate an existing source table and apply a different compute pipeline.

This is the cleanest way to branch one expensive dataset into multiple monitor-specific transformations.

Syntax

sources:
  rawSensors:
    type: ipmi
    computes:
    - type: awk
      script: ${file::sdr_formatter.awk}

  sensorStatus:
    type: copy
    from: ${source::monitors.sensor.collect.sources.rawSensors}
    computes:
    - type: keepOnlyMatchingLines
      column: 3
      regExp: "(ok|degraded|failed)"

Properties

Property Required Default Description
type Yes None copy.
from Yes None Source reference or inline serialized table to duplicate.
computes No [] Additional transforms applied after copy.
forceSerialization No false Serialize execution via a per-connector, per-host lock (see the Sources overview). Default false.
  • Use copy to avoid rerunning expensive protocol calls.
  • Keep the original source as the canonical raw dataset.
  • Name copies by purpose (statusView, capacityView, errorsView).

Common Mistakes

  • Copying already over-transformed data instead of the raw source.
  • Creating deep copy chains (copy of copy of copy) that hurt readability.
  • Forgetting that copied tables preserve row/column order, including any quirks.

Community Examples

copy source source reuse pipeline branching metricshub community connector hardware system
Links:
  • [1] https://github.com/metricshub/community-connectors/blob/main/src/main/connector/hardware/IpmiTool/IpmiTool.yaml
  • [2] https://github.com/metricshub/community-connectors/blob/main/src/main/connector/hardware/AMDRadeon/AMDRadeon.yaml
Searching...
No results.