Part of the beauty of using LeapFrogBI to define your data mart is how easy it is to make modifications. One example of this is the ”Redirect Source” feature. With this feature a component’s source can be changed by simply selecting the new source component and mapping new source fields to each of the old source fields that are in use. To initiate a source component change simply go to the component’s detail page. Directly above and to the right of the field list will be a link titled “Redirect Source”. After clicking this link you will be presented with a form (below) which will allow you to specify the new source component and map new source fields to all required redirects. You must map all required fields prior to saving the redirect. Otherwise a validation error will be returned such as below. See end of this post for all validation rules related to redirects.
The below image shows how components in a typical data mart are dependent upon each other as either a source or a destination. LeapFrogBI ensures that this lineage is never broken. However, it is often necessary to change a component’s source. This is what is referred to a redirect in LeapFrogBI.
In this example, the red PSA component uses the purple stage component as its source. All of the green components are dependents of the red PSA. Let’s assume that we need to adjust to a change in the source system. To do so we need to profile the new source and create a new stage (light purple stage).
It would be a real pain to rebuild the seven components that are dependent on the existing stage (dark purple) just to account for a source system change. This is where the ”Redirect Source” feature comes in very handy. All we need to do is redirect the red PSA to the new Stage (light purple) component.
After completing the redirect, we can delete the old stage if it is no longer needed. The redirect is now complete. When the Stage and PSA component are deployed the changes will be in place. You may notice that we did not worry about connection information. LeapFrogBI will ensure that all of the connection information is sourced from the appropriate component without any action on the developer’s part. Validation Rules
LeapFrogBI enforces a few validation rules to ensure the integrity of the system.
- The new source component cannot be a dependent of the current component
- Appropriate component types will be available for selection. (PSA cannot redirect to a Dimension)
- Old source component fields that are used must be replace by fields in the new source component
- When mapping fields the old and new field data type must match
You can even redirect to the current source component & adjust how fields are mapped. This can be a useful feature when you mistakenly use the wrong field when building a few expressions. Instead of changing all of the expressions, fields, sorts, etc… where the field is currently used you can simply use the redirect feature. In this case you will be redirecting to the same source component and only making changes to field mapping. Exceptions
There are a few component types & templates that cannot be redirected. Stage components are based on a profile so they cannot be redirected. All “existing” type component templates are also based on a profile & cannot be redirected. In both of these cases a new profile should be created and used when creating a new component. The dependents of the original component can then be redirected as explained above. There are also 3 types of transform templates that are not redirectable (pivot, unpivot, and sets). In these cases developers can replace the component with a new component sourced from the new source & then redirect the dependents of the original component to the new component. Conclusion
In summary, the ”Redirect Source” feature is not something that you will use every day, but when you need it you will be super happy that it is available. You will be even happier if you are familiar with the level of rework that this type of change often requires when building data marts using traditional methods.