Column rename transform
Overview
column-rename registers a table transform used by another factory. It changes a queryable view's names and types, not stored source data.
Example configuration
rules: # Required: ordered rules; first match wins.
- type: direct # Select the direct-name variant.
from: temperature # Required: example source column.
to: temperature_c # Required: example output column.
cast: null # Default: preserve the source type.
- type: pattern # Alternative rule variant; no cast option.
pattern: "^sensor_(.*)$" # Required: example regular expression.
replacement: "$1" # Required: captured name becomes the output name.
Use and behavior
Install the transform with pond mknod column-rename /etc/rename --config-path rename.yaml, then reference /etc/rename in a consuming factory's transforms list.
Rules apply first-match-wins. Direct rules can request a cast. Invalid types or regular expressions and conflicting output schemas fail. Inspect the consuming node's schema to observe the result.
Full configuration
Settings
| Field | Accepted type | Required | Default | Description |
|---|---|---|---|---|
rules | array of Rename Rule | yes | not specified | List of rename rules applied in order |
Rename Rule
A single column rename rule
Choose one of the following:
Direct column name mapping
| Field | Accepted type | Required | Default | Description |
|---|---|---|---|---|
cast | string | null | no | not specified | |
from | string | yes | not specified | |
to | string | yes | not specified | |
type | "direct" | yes | not specified |
Regex pattern-based renaming
| Field | Accepted type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | yes | not specified | |
replacement | string | yes | not specified | |
type | "pattern" | yes | not specified |