In the previous chapter we've configured a Value Lookup function that uses a translation table that would be created during the Shuffle on the LAST_NAME columns. If we would execute this template in the current state there are no hard dependencies between our functions. This could result in that the Value Lookup is executed before the Shuffle. During the execution of the Value Lookup you will get errors because the lookup table (Translation Table TT_LASTNAMES) has not been created yet. To prevent this error, we have to make sure that the Value Lookup will be executed after the Shuffle!
DATPROF Privacy enables users to create dependencies between functions and scripts.
Now let's add an dependency between the shuffle and the value lookup!
- Select the CUSTOMER_HISTORY table
- Double click on the Value Lookup function that we've created before
The function editor will open, lets add the dependency
- Click on the Dependencies tab
- Currently the list is empty, because there are no dependencies
- Click the Edit button to open up the dependency editor
The dependency editor consist of three parts
- The list of predecessors. You can select one or more functions that must be executed before the current function
- The list of successors. You can select one or more functions that must be executed after the current function
- A graphical representation of the added dependencies
- In the predecessor list, select the Shuffle on the CUSTOMER (LAST_NAME, LAST_NAME_UPPER)
- Check in the graph below if both function are in the correct order (first the Shuffle than the Value Lookup)
- Click OK to add the dependency and close the dependency editor
- The dependency has now been added to the dependencies of the Value Lookup as well as the Shuffle, click OK to save the changes en close the function editor
Great, now you know how add dependencies between functions!
- To get a complete overview of your functions and the dependencies go to the Visualize menu in the upper menu bar and click the Visualize Process Model... This will visualize all functions and scripts with their dependencies.
You may notice some dotted line arrows. These are the system dependencies. DATPROF Privacy knows which functions can be technically executed in parallel. These functions are combined in groups. The normal line is your user defined dependency!
If you got stuck, review this short clip how to add dependencies between functions.