3.2.4. 创建事实表
对于事实度量,使用 Orders 和 Order line。
-
首先,创建 Order Line 变换。拖拽 Table input 节点到工作簿(worksheet)并且定义报表需要的字段:
id
、product_id
、quantity
和order_id
:Figure 9. OrderLine 表输入 -
然后创建 order lines 的插入/更新节点:
Figure 10. 插入/更新 OrderLine -
创建 orders 变换:
Figure 11. Order 变换 -
最后,在表中更新 customer ID:
Figure 12. 更新 customers -
现在事实变换创建好了:
Figure 13. 事实变换 -
在变换外面套上相应的任务:
Figure 14. Facts job