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

In this exercise you will load reference data into your model which lists all the TV channels offered in each package. You will use this to break out each customer record, in Latest Package Update, into a set of records for each channel that the customer has ordered.

Load reference data

The database table SOURCE_PACKAGE_CHANNELS gives the list of channels available in each package.

Create Stream for full channel list

Add a new stream to your model to hold the full channel list:

To complete the configuration:

This means that the lookup will match records in the reference data (SOURCE_PACKAGE_CHANNELS) where PACKAGE = Package from the input pipe in
We must do this, rather than using the value of Package from the output because we are using the lookup to drive an output multiplier – and output multipliers are calculated before the output is generated

This means that for each output record processed, PhixFlow will look up the list of channels for the package from the reference stream; it will then work through the list returned, handling each element from the list in turn and generating an output record in the stream for each one

This will print the value of the current element of the output multiplier list to this field

On older models in PhixFlow you may see the internal variable _type. This is the old name for _outputMultiplier. Either can be used, and anywhere you see _type you can update it to _outputMultiplier for clarity.