03-31-2021 06:43 AM
I have a child pipeline which depends on successful execution of other parent pipeline. In parent pipeline, I am updating some MySQL tables from external source. Then in child pipeline, this updated MySQL tables are used in custom SQL query. I need to ensure that before running this custom query in child pipeline, parent pipeline has properly updated the tables in MySQL DB and it didn’t failed hence before running child pipeline I need to know if the parent pipeline was executed successfully or not. How do I achieve this?
Solved! Go to Solution.
04-15-2021 10:47 AM
Here’s an example project of what I was thinking of. In this project, there is a parent pipeline with 3 Pipeline Execute snaps. Each Pipeline Execute will execute child pipelines: step 1, step 2, and step 3. The parent will execute step 1, but step 2 is designed to fail. Notice that since it failed, the Pipeline Execute called step 3 is not executed. Is this a helpful example of what I had proposed?
projects_exe-on-success.zip (3.5 KB)
03-31-2021 08:01 AM
You could rely on the default error behavior for snaps and the Pipeline Execute snap to achieve this.
Take that pipeline for example. In order for the Pipeline Execute snap to run, both the MySQL update snaps must succeed. Otherwise, the Pipeline will stop executing.
04-01-2021 05:52 AM
@tlikarish thanks for reply. Actually both my Parent and Child pipeline completely independent. In your example you are doing MySQL update and calling the Pipeline Execute Snap to call the child pipeline. But in my case in Parent pipeline, I am doing mapping and using diff snap to update and insert the MySQL table.
Also pipeline used in Pipeline Execute snap must have some kind of input open which in my case there is no input in child pipeline.
Basically think like we have multiple pipelines and we need to chain them together so that successful run of one pipeline triggers execution of next pipeline in the chain. All these pipelines in chain do not have open input or output which is required by the Pipeline Execute snap. If any of the pipeline fails in the chain, then execution stops at that pipeline and further pipelines in chain are not executed until chain is restarted from the beginning. Is it possible to do in SnapLogic?
04-06-2021 09:08 AM
Yes, this is possible. It might be non-obvious, but the Pipeline Execute snap can invoke a child pipeline that does not have any unlinked views. When it does this, then it will execute the pipeline and wait for its completion before proceeding. The output of the Pipeline Execute when there is no unlinked output view is the status of the child pipeline’s execution. So it is possible to use Pipeline Execute to do some simple orchestration like you’re describing.
04-10-2021 06:02 AM
@tlikarish Thank you for the suggestion. Would it be possible for you provide one example which will help me understand better what you are suggesting?