RENAME COLUMNS IN SECOND KEYVALUE BASED ON THE MAP DATA¶
Renames keys in a second key-value store (kv2) to match the naming convention of a first key-value store (kv1) using a user-defined mapping. The renaming map is expressed as A=>B pairs, where the left side refers to a key name in kv1 and the right side is the corresponding key name in kv2. Use this worker to synchronise or align key names across two key-value datasets before merging or comparison.
When to use¶
Classification: process.
Tagged: column-mapping, key-alignment, keyvalue, rename, sync, transformations.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Keyvalue 1 | kv1 | keyvalue | — | The reference key-value store whose key names serve as the rename targets (left-hand side of each A=>B mapping pair); optional if no mapping references kv1 keys. | |
| Keyvalue 2 | kv2 | keyvalue | — | The key-value store whose keys will be renamed according to the mapping; the right-hand side labels in the compare_keys map correspond to keys in this store. | |
| Compare Keys | compare_keys | textarea | — | Newline-separated rename rules in A=>B format, where A is a key name from kv1 and B is the corresponding key name in kv2 to be renamed; e.g. velocity=>speed renames the kv2 key speed to velocity. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| keyvalue_rename_output_1 | keyvalue_rename_output_1 | keyvalue | A copy of kv2 with all specified keys renamed according to the provided mapping rules; unmatched keys are passed through unchanged. |
Disciplines¶
- data.dataset.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=keyvalue_sync_with
Auto-generated from transformation schema. Worker id: keyvalue_sync_with. Schema hash: e62ebac847bc. Hand-curated docs in workerexamples/ override this page when present.