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.
The database table SOURCE_PACKAGE_CHANNELS
gives the list of channels available in each package.
Rating and Billing
, to read all the records from this tableAdd a new stream to your model to hold the full channel list:
Latest Package Update
Latest Package All Channels
Latest Package Update
to Latest Package All Channels
To complete the configuration:
SOURCE_PACKAGE_CHANNELS
into Latest Package All Channels
chan
PACKAGE
from the left hand (input) listPackage
from the right hand (output) list over the top of the Order/Index attribute PACKAGE
PACKAGE
to edit its details:_out.Package
to: in.Package
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
Latest Package All Channels
by double clicking itchan.CHANNEL
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
Channel
_outputMultiplier
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. |
Latest Package All Channels