PhixFlow Help

Generating a file per team

By the end of this chapter you will be able to:

  • Use a File Exporter to generate a file per team/group/etc., using the Input Multiplier

Drag the Stream AM Team Results on to a model. Run Analysis on this Stream. You will see a data set with results for each of a number of teams.
To produce an output file per team:

  • Add a File Exporter with Name Export Team Results to your model
  • Add a lookup pipe from AM Team Results to Export Team Results
  • To complete configuration of this pipe:
    • Give it the Name team
    • Add the Order/Index Attribute TEAM
    • Add an Aggregate Attribute – any attribute will do. Adding a single Aggregate Attribute will make the pipe give results grouped by the Order/Index Attributes specified – in this case, TEAM. In this case we aren't interested in the results of the Aggregate Attribute, we just want to use the key values generated.
  • To complete configuration of the File Exporter:
    • Set the Input Multiplier expression to: team.TEAM

This will give you a unique list of teams from the input Stream, provided by the lookup pipe team

    • Set the File Name expression to: _inputMultiplier + "_results." + now() + ".csv"
    • Set the Output Directory expression to: "teamResults"
    • Tick the flag Enabled
  • Add a push pipe from AM Team Results to Export Team Results
  • Add a filter on this pipe:

TEAM equals _inputMultiplier
Remember to make the filter value an expression – fx
This filter will ensure that as each team is processed by the Input Multiplier, only the results for that team will be retrieved from the input Stream.
Run Analysis on AM Team Results. Check that an output file is generated for each team – and containing only results for that team.

This technique can be extended to email different lists of people for each file generated. You can do this by using the _inputMultiplier variable in the Send By Email tab of a File Exporter – in the fields Subject Expression, Message Expression and Recipients or Recipients Expression (whichever of Recipients or Recipients Expression you are using).

Please let us know if we could improve this page feedback@phixflow.com