0 / 0
setglobalsnode properties

setglobalsnode properties

Set Globals node iconThe Set Globals node scans the data and computes summary values that can be used in CLEM expressions. For example, you can use this node to compute statistics for a field called age and then use the overall mean of age in CLEM expressions by inserting the function @GLOBAL_MEAN(age).

Example

stream = modeler.script.stream()
typenode = stream.findByID("id42KW3MSA94B")

node = stream.create("setglobals", "My node")
stream.link(typenode, node)

node.setKeyedPropertyValue("globals", "Na", ["Max", "Sum", "Mean"]) 
node.setKeyedPropertyValue("globals", "K", ["Max", "Sum", "Mean"])
node.setKeyedPropertyValue("globals", "Age", ["Max", "Sum", "Mean", "SDev"])
node.setPropertyValue("clear_first", False)
Table 1. setglobalsnode properties
setglobalsnode properties Data type Property description
globals [Sum Mean Min Max SDev] Structured property where fields to be set must be referenced with the following syntax: node.setKeyedPropertyValue(
"globals", "Age", ["Max", "Sum",


"Mean", "SDev"])
clear_first flag  
show_preview flag  
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