Sub-project error identification

Hi Guys

Lets say you set up a “master project” in its only function is to run sub-projects.

Lets say you have 200 sub-projects which need to be run. Each sub-project takes data from a separate source, and transforms it - and each sub-project needs to be run on a monthly basis. So once a month, you hit RUN on your master project.

Lets say there is an error, because in one of the sub-projects, the source data has been incorrectly formatted.

QUESTION: Is there a way to identify from which sub-project the error has arisen? From my quick test on this, my “master project” just indicated an error - but not which sub-project it was sourced within.

Many thanks

Hi Robert,

My answer will be a bit lengthy, but please stay with me.

In a simple iteration case, when one child project is called for all file names, the path to file to load is passed through a parameter. See the scheme below:

image

When an error occurs in the iterated (i.e. child) project, two errors are shown. One error that comes from the iterated project. The other error is from the master (i.e. iterating) project. That error contains the name of the iterated project.


In cases when you need to run different child projects (subprojects) for each file, you will need to have additional intermediate dispatcher project between the master project and the child projects. The dispatcher specifies which child project to run for given file.

Here is a scheme how it should work:

image

The dispatcher project has 2 parameters:

  1. Path to the file to load, and
  2. Path to the child project to run for that file.

The entire dispatcher project consists of only one action: Call. In this Call action, the path to project to run use specified using the parameter with path to child project. See the screenshot below:

image

When an error occurs in a child project (which we remember is specified by a parameter), the master project shows also two errors. However, in this case, the name of the failed child project is indicated in the parameter value. See screenshot below:

Here is full example with dispatcher and failing child project. In the example the child project is the same for all files, but you can change the way column [Project] is calculated in the master project to specify different child projects for different files.

Iteration with dispatcher.zip (190.9 KB)

All paths are relative in the example, so it should work out of the box.

Brilliant. That works. (Note, when you do a simple multiple load of files in a folder, it does not show which file in the folder produces the error).