# 5.6. Run data drift and model quality checks in an Airflow pipeline \[OPTIONAL CODE PRACTICE]

{% embed url="<https://youtu.be/YHO7k3T_fZA?si=9ePxgZso8mA4CsFR>" %}

**Video 6**. [Run data drift and model quality checks in an Airflow pipeline \[OPTIONAL CODE PRACTICE\]](https://youtu.be/YHO7k3T_fZA?si=9ePxgZso8mA4CsFR), by Emeli Dral

In this video, we show how to automate the data or model quality checks implemented with the Evidently Python library using Airflow.

**Want to go straight to code?** Here is the [code example](https://github.com/evidentlyai/ml_observability_course/tree/main/module5/airflow_conditional_checks) to follow along.

**Outline:**\
[00:00](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=0s) Introduction\
[01:09](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=69s) Install Airflow\
[02:47](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=167s) Install dependencies\
[05:20](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=320s) Rebuild the container and access Airflow UI\
[07:06](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=426s) Start creating the DAG\
[10:00](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=600s) Specify DAG parameters\
[12:48](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=768s) Add functions and implement DAG\
[17:55](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=1075s) Implement load data function\
[19:21](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=1161s) Implement drift analysis function\
[21:32](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=1292s) Implement create report function\
[23:14](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=1394s) View DAG in Airflow\
[26:06](https://www.youtube.com/watch?v=YHO7k3T_fZA\&t=1566s) Execute a DAG and view the drift report


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.evidentlyai.com/ml-observability-course/module-5-ml-pipelines-validation-and-testing/data-drift-model-quality-checks-airflow-code-practice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
