Skip to main content
Version: v0.19.0-alpha 🚧

EntityMapProperties

Alias:EntityMapProperties, RenameEntityFields, RenameProperties, RenameProps

Output:Array<T>

Rename entity properties.

ParameterTypeRequiredPositionSummary
EntityStream
In
array<entity>✔1The stream of entities to change the field names of.
Mappings
To
entity✔2An entity containing mappings. The keys in the entity will be the new column names. The value of each property should either the name of the source column or a list of source column names

Examples​

Example 1​

SCL​

EntityMapProperties In: [
('typeA': 'A', 'valueA': 1)
('typeB': 'B', 'valueB': 2)
('typeA': 'A', 'valueA': 3)
] Mappings: ('value': ['valueA', 'valueB'] 'type': ['typeA', 'typeB'])

Expected Output​

[('type': "A" 'value': 1), ('type': "B" 'value': 2), ('type': "A" 'value': 3)]

Example 2​

SCL​

RenameProperties In: [('a': 1), ('b': 1), ('c': 1)] To: ('value': ['a', 'b', 'c'])

Expected Output​

[('value': 1), ('value': 1), ('value': 1)]