PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Calculate Average

Scenario

Given a large volume of data, we want to determine the average of a certain field, grouped by some other field.

This is a very simple exercise, and it probably does not constitute a pattern, but it does provide a useful introduction to PhixFlow and the aggregate functions built into the pipe functionality.

Solution:

  • Create a stream (loaded from a file is fine) containing a list of countries, years and populations
  • Create second stream from the data in the first stream
  • Configure the pipe that joins the 2 streams to calculate the average population, grouped by country

See Also

  • href="../../../../../../doc/training/Exercises.pdf">Patterns and Exercise Training Document
  • href="http://www.phixflow-online.com:8081/patterns">PhixFlow Online Patterns and Training
  • No labels