0 / 0
transposenode properties

transposenode properties

Transpose node iconThe Transpose node swaps the data in rows and columns so that records become fields and fields become records.

Example

node = stream.create("transpose", "My node")
node.setPropertyValue("transposed_names", "Read")
node.setPropertyValue("read_from_field", "TimeLabel")
node.setPropertyValue("max_num_fields", "1000")
node.setPropertyValue("id_field_name", "ID")
Table 1. transposenode properties
transposenode properties Data type Property description
transpose_method enum Specifies the transpose method: Normal (normal), CASE to VAR (casetovar), or VAR to CASE (vartocase).
transposed_names Prefix Read Property for the Normal transpose method. New field names can be generated automatically based on a specified prefix, or they can be read from an existing field in the data.
prefix string Property for the Normal transpose method.
num_new_fields integer Property for the Normal transpose method. When using a prefix, specifies the maximum number of new fields to create.
read_from_field field Property for the Normal transpose method. Field from which names are read. This must be an instantiated field or an error will occur when the node is executed.
max_num_fields integer Property for the Normal transpose method. When reading names from a field, specifies an upper limit to avoid creating an inordinately large number of fields.
transpose_type Numeric String Custom Property for the Normal transpose method. By default, only continuous (numeric range) fields are transposed, but you can choose a custom subset of numeric fields or transpose all string fields instead.
transpose_fields list Property for the Normal transpose method. Specifies the fields to transpose when the Custom option is used.
id_field_name field Property for the Normal transpose method.
transpose_casetovar_idfields field Property for the CASE to VAR (casetovar) transpose method. Accepts multiple fields to be used as index fields. field1 ... fieldN
transpose_casetovar_columnfields field Property for the CASE to VAR (casetovar) transpose method. Accepts multiple fields to be used as column fields. field1 ... fieldN
transpose_casetovar_valuefields field Property for the CASE to VAR (casetovar) transpose method. Accepts multiple fields to be used as value fields. field1 ... fieldN
transpose_vartocase_idfields field Property for the VAR to CASE (vartocase) transpose method. Accepts multiple fields to be used as ID variable fields. field1 ... fieldN
transpose_vartocase_valfields field Property for the VAR to CASE (vartocase) transpose method. Accepts multiple fields to be used as value variable fields. field1 ... fieldN
transpose_new_field_names array New field names.
transpose_casetovar_aggregatefunction mean
sum
min
max
median
count
When there's more than one record for an index, you must aggregate the records into one. Use the Aggregate Function drop-down to specify how to aggregate the records using one of the aggregation functions.
default_value_mode Read
Pass

Set the default mode for all fields to Read or Pass. The import node passes fields by default, while the Type node reads values by default.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more