Icon

3. Java IF & Tables

<p><strong>Java IF &amp; Tables</strong></p><p>This workflow implements an example of an automated if switch to control workflow execution using the <em>Java IF (Table)</em> node.</p><p>The <em>cars-85.csv</em> dataset contains various information about different cars. We want to process the data differently: the price of two-door cars should be scaled by factor 1/50 (top branch), the price of four-door cars by factor 1/100 (bottom branch). The choice of two-door or four-door is made in the <em>Value Selection Configuration</em> node. The output flow variable then controls the data path throughout the workflow. Finally, we visualize the data (engine_size, horse_power, and scaled_price) in a <em>Box Plot</em>.</p>
Annotations and comments
  • Workflow: Java IF & Tables This workflow implements an example of an automated if switch to control workflow execution using the Java IF (Table) node. The cars-85.csv dataset contains various information about different cars. We want to process the data differently: the price of two-door cars should be scaled by factor 1/50 (top branch), the price of four-door cars by factor 1/100 (bottom branch). The choice of two-door or four-door is made in the Value Selection Configuration node. The output flow variable then controls the data path throughout the workflow. Finally, we visualize the data (engine_size, horse_power, and scaled_price) in a Box Plot.
  • Creating flow variable To control IF Switch
  • Workflow control with Java IF Split data table based on selected number of car doors: Top branch: two doors Bottom branch: four doors
  • Visualizing data engine_size horse_power price_scaled
  • Reading data
  • Observe distribution of some variables
  • Keep only relevant columns
  • Collect data from all active branches
  • Scale Price by a 1/100 factor
  • Scale Price by a 1/50 factor
  • Port selection based on selected number of doors
  • Nr. of doors: four
  • Nr. of doors: two
  • Define options: two or four doors

Nodes

Extensions

Links