Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有带有数据的 csv 文件
name, state
.
我想把这些数据放到表中:
Table1{id[PK], name} State{table1_id[FK], state}.
这里的主要问题是如何存储新创建的 Table1 id 并在插入状态表期间使用它如何使用 pentaho 执行此操作?
对于 Table1(在您的示例中为维度),使用“数据仓库”选项卡中的“组合查找/更新”:
将“组合查找/更新”连接到“插入/更新”。对状态表使用“插入/更新”(在您的示例中是事实表)
“组合查找/更新”检查维度表中是否存在给定的字段,如果是,则您有数据库中的 id,如果不存在,则将插入新值并返回新键。
问候马特乌斯