1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Pipelines

Exercise

Monitoring and alerting within a data pipeline

It's time to put it all together! You might have guessed it, but using handling errors using try-except and logging go hand-in-hand. These two practices are essential for a pipeline to be resilient and transparent, and are the building blocks for more advanced monitoring and alerting solutions.

pandas has been imported as pd, and the logging module has been loaded and configured for you. The raw_sales_data DataFrame has been extracted, and is ready to be transformed.

Instructions 1/3

undefined XP
    1
    2
    3
  • Create an info-level logging message to document success, and a warning-level logging message if the transformation fails.