Chapter 7. Validating Data and Handling Errors

So far, you have been working alone in front of your own computer. In the "Time for action" exercises, the step-by-step instructions along with the error-free sample data helped you create and run transformations free of errors. During the "Have a go hero" exercises, you likely encountered numerous errors, but tips and troubleshooting notes were there to help you get rid of them.

This is quite different from real scenarios, mainly for two reasons:

  • Real data has errors—a fact that can't be avoided. If you fail to heed it, the transformations that run with your sample data will probably crash when running with real data.
  • In most cases, who runs your final work is decided by an automated process and is not user defined. Therefore, if a transformation crashes, there will be nobody to fix the problem.

In this chapter you will learn about the options that PDI offers to treat errors and validate data so that your transformations are well prepared to be run in a productive environment.

Capturing errors

Suppose that you are running or previewing a transformation from Spoon. As you already know, if an error occurs it is shown in the Logging window inside the Execution Results pane. As a consequence, you can look at the error, try to fix it, and run the transformation again. This is far from what happens in real life. As said, transformations in real scenarios are supposed to be automated. Therefore, it is not acceptable to have a transformation that crashes without someone who notices it and reacts to that situation. On the contrary, it's your duty to do everything you can to trap errors that may happen, avoiding unexpected crashes when possible. In this section you will learn how to do that.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.235.219