3.2.4. Create Facts
For the Facts measure we will take the Orders and Order Lines.
-
First, create the Order Line transformation. Drag and drop the Table input node onto the worksheet and define the fields we need for the report:
id
,product_id
,quantity
andorder_id
:Figure 9. OrderLine table input -
Then create an Insert/Update node for order lines:
Figure 10. Insert/Update OrderLine -
Create the transformation for orders:
Figure 11. Order transformation -
Finally, update the customers IDs in the table:
Figure 12. Update customers -
The Facts transformation is now ready:
Figure 13. Facts transformation -
Wrap the transformation in the corresponding job:
Figure 14. Facts job