3.2.3. 创建维度表
维度表将使用 Products 和 Customers。每个 Product 会关联一些 product line(产品线),产品线就是产品的种类,比如 Ford T 属于 Vintage Cars 产品线。
Customers 属于特定的城市,这些城市属于某些国家,国家又按照洲分布。
-
首先,创建 Product 变换。拖拽 Table input 节点到工作簿(worksheet)并且定义报表需要的字段:product
id
,name
和product_line_id
。Figure 3. Product 表输入 -
然后创建 products 的插入/更新节点:
Figure 4. 插入/更新 Product -
创建 product lines 变换:
Figure 5. Product 变换 -
通过 Update 节点完成第一个变换:
Figure 6. 更新 Product -
按照相同的方式创建 Customer 变换,包含城市和洲级别。然后添加到第一个 Product 中:
Figure 7. Customer 变换 -
当变换准备好之后,再套上外围相应的任务,START - 启动 和 Success - 成功,以及 Abort job 节点用来做出错时退出:
Figure 8. 维度任务