Using whylogs with Airflow
Describes how to use whylogs with Airflow DAGs.
Prerequisites
About this task
In HPE Ezmeral Unified Analytics Software, whylogs is integrated to work with Airflow DAGs. You can use whylogs with Airflow to profile and monitor the data and detect drifts as data flows through the data pipelines.
To use whylogs with Airflow DAGs, refer to the Airflow DAG example in GitHub.
The basic steps are outlined as follows:
- Import the required libraries and modules from whylogs in your Airflow DAG script. You can use notebooks to create your Airflow DAG. To learn about notebooks, see Creating and Managing Notebook Servers.
- Define your Airflow DAG that can profile and monitor the data to detect drifts.
- Add your DAG to the Git repository. NOTEIf you do not have the repository to store Airflow DAGs, request an administrator to configure the Git repository now. For details, see Airflow DAGs Git Repository.
- Navigate to the Airflow screen using either of the
following methods:
- Click Data Engineering > Airflow Pipelines.
- Click Tools & Frameworks, select the Data Engineering tab, and click Open in the Airflow tile.
- In Airflow, verify that you are on the DAGs screen and your defined DAG is available in the DAGs screen.
- To run your DAG, click the play button.
- Once your DAG run completes, navigate back to the HPE Ezmeral Unified Analytics Software home screen.
- In the left navigation bar, go to Data Engineering > Data Sources.
- Click Browse.
- Go to the
/shared/<airflow-whylogs>
folder which is a path set in your DAG to store the logs from whylogs. You can see that the data proļ¬les and the drift summary report are stored in the shared volume in the.html
and.bin
formats. - To download a summary report, select Download from the Actions menu.
Results
You can analyze the summary report to detect drifts and monitor your data.