简体   繁体   English

Pentaho勺子工具转换顺序

[英]Pentaho Spoon Tool Transformation Order

I am trying to design an ETL structure and i stucked in the below step. 我正在尝试设计ETL结构,并且陷入了以下步骤。

在此处输入图片说明

As you can see i have 3 steps and each step holding a FK value from previous step. 如您所见,我有3个步骤,每个步骤都包含上一步的FK值。 For example TABLE3 has a column with FK Constraints which shows the PK value in TABLE2 and TABLE2 has same relationship with TABLE1 . 例如, TABLE3有一个带有FK约束的列,该列显示TABLE2中的PK值,而TABLE2TABLE1具有相同的关系。

The problem is when i start this job all these 3 steps are running simultaneously and error is occuring about FK constraints since TABLE2 trying to set a FK before TABLE1 creation completes. 问题是,当我开始这项工作时,所有这三个步骤都同时运行,并且由于TABLE2试图在TABLE1创建完成之前设置FK,所以出现了有关FK约束的错误。

I am not sure if this is the best practice for creating an ETL process but is there a way to run these 3 steps in specified sequence? 我不确定这是否是创建ETL流程的最佳实践,但是是否可以按指定的顺序运行这3个步骤?

Inserting/updating the same database in parallel, i am afraid will throw you an error (like you have done). 并行插入/更新同一数据库,恐怕会引发错误(就像您所做的那样)。 please try to separate these transformations into multiple ktr files. 请尝试将这些转换分成多个ktr文件。 I assume you will not face the same issue again. 我认为您不会再遇到相同的问题。 Hope it helps:) 希望能帮助到你:)

My solution; 我的解决方案;

In Design panel under the Flow steps there is a usefull tool called "Block this step until steps finish" which helps you observe the steps you want and than start the step which is blocked so that you will have no problem with FK and other dependencies.. Here is the implementation; 在“流程”步骤下的“设计”面板中,有一个有用的工具,称为“阻止此步骤,直到步骤完成”,它可以帮助您观察所需的步骤,而不是开始被阻止的步骤,这样您就不会遇到FK和其他依赖项的问题。这是实现;

在此处输入图片说明

The best way is to set up a JOB, which calls the 3 transformations in the specific order. 最好的方法是设置一个JOB,它按特定顺序调用3个转换。

Job entries run sequentially, whereas transformation steps always run in parallel. 作业条目按顺序运行,而转换步骤始终并行运行。 If you need even A to take place before event B they should be put in that order inside a job. 如果您甚至需要在事件B之前进行A,则应将它们按顺序放在作业中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM