I suggest you browse through the following list of items before you build the graph.
|•||Our example uses "ExtHashJoin" but there are also other types of Joins you should be aware of. Which Join type to use is really a question of processing speed. "Lookup Join" is fast and assumes you are using Lookups (explained in the advanced chapter). "ExtMergeJoin" is faster than ExtHashJoin but it requires that the incoming data is pre-sorted on the Join key.|
|•||Get your metadata defined properly.|
|•||Test and Debug to see what is going on.|
|•||Make sure you remember to set the "Sorted input" property to "false" for the Aggregate command. See what happens if you leave it as "true". |
|•||At some point, you will have to mutiply the unit price and quantity fields to obtain the cost of each order detail.|
|•||Be aware of the following Join properties|
|▪||Transform (allows you to map fields from then input to ouput ports; behaves like the dedicated "Reformat" component.|
|▪||Allow slave duplicates (if you have 2 ports and are not too careful about which is the master and which the slave, setting this ensures you get your full set of records; has the effect of switching the ports around)|
|▪||Sorted input (this you will need to set to false in our example unless you use a Sort component in your graph.|
|•||The Aggregate mapping will need to look like this|
Tips & Tricks : If you happen to have 2 input ports on the Join, say, and then want to swap them around, you will probably find that your mapping (Transform) is messed up. You can put this right but deleting the lines of script within the transform() function that will appear when you try to open the Transform dialog. Once you have deleted them, you can switch back to the visual mapping mode. Or, if you are feeling brave, where you see a $1.xxxxx (after the ':=' ) change it to a $0.xxxx and vice-versa. CTL Scripting is covered in more detail in the Advanced chapters.