Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameanalysis
nopaneltrue

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:

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