Last updated: Jan 17, 2024
The Restructure node converts a nominal or flag field into
a group of fields that can be populated with the values of yet another field. For example, given a
field named payment type
, with values of credit
,
cash
, and debit
, three new fields would be created
(credit
, cash
, debit
), each of which might
contain the value of the actual payment made.
Example
node = stream.create("restructure", "My node")
node.setKeyedPropertyValue("fields_from", "Drug", ["drugA", "drugX"])
node.setPropertyValue("include_field_name", True)
node.setPropertyValue("value_mode", "OtherFields")
node.setPropertyValue("value_fields", ["Age", "BP"])
restructurenode properties |
Data type | Property description |
---|---|---|
fields_from
|
[category category category]
all
|
|
include_field_name
|
flag | Indicates whether to use the field name in the restructured field name. |
value_mode
|
OtherFields
Flags
|
Indicates the mode for specifying the values for the restructured fields. With
OtherFields , you must specify which fields to use. With Flags , the
values are numeric flags. |
value_fields
|
list | Required if value_mode is OtherFields . Specifies which
fields to use as value fields. |