|
| 1 | +--- |
| 2 | +title: Create a private requirement package for Managed Airflow |
| 3 | +description: This article provides step-by-step instructions for how to create a private requirement package within a Managed Airflow environment in Azure Data Factory. |
| 4 | +author: nabhishek |
| 5 | +ms.author: abnarain |
| 6 | +ms.reviewer: jburchel |
| 7 | +ms.service: data-factory |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 09/23/2023 |
| 10 | +--- |
| 11 | + |
| 12 | +# Create a private requirement package for Managed Airflow |
| 13 | + |
| 14 | +[!INCLUDE[appliesto-adf-xxx-md](includes/appliesto-adf-xxx-md.md)] |
| 15 | + |
| 16 | +Creating a private requirement package within a Managed Airflow environment involves several key steps to ensure seamless integration. By following these steps, you can effectively manage and utilize your own custom packages. If you're interested in learning how to create a custom package in Python, refer to the guide [Creating a package in python](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/modules_management.html#creating-a-package-in-python). |
| 17 | + |
| 18 | +## Step 1: Create a storage container |
| 19 | + |
| 20 | +Use the steps described in [Manage blob containers using the Azure portal](/azure/storage/blobs/blob-containers-portal) to create a storage account for the package. |
| 21 | + |
| 22 | +## Step 2: Upload the private package into your storage account |
| 23 | + |
| 24 | +1. Navigate to the designated container where you intend to store your Airflow DAGs and Plugins. |
| 25 | +1. Upload your private package file to the container. Common file formats include zip, whl, or tar.gz. Place the file within either the 'Dags' or 'Plugins' folder, as appropriate. |
| 26 | + |
| 27 | +## Step 3: Add your private package as a requirement |
| 28 | + |
| 29 | +1. Add your private package as a requirement in the requirements.txt file. Add this file if it doesn't already exist. |
| 30 | +1. Be sure to prepend the prefix "**/opt/airflow**" to the package path. For instance, if your private package resides at _/dats/test/private.wht_, your requirements.txt file should feature the requirement _/opt/airflow/dags/test/private.wht_. |
| 31 | + |
| 32 | +## Step 4: Import your folder to an Airflow integrated runtime (IR) environment |
| 33 | + |
| 34 | +When performing the import of your folder into an Airflow IR environment, ensure that you enable the import requirements checkbox. |
| 35 | + |
| 36 | +:::image type="content" source="media/airflow-create-private-requirement-package/import-requirements-checkbox.png" alt-text="Screenshot showing the import dialog for an Airflow integrated runtime environment, with the Import requirements checkbox checked."::: |
| 37 | + |
| 38 | +## Next steps |
| 39 | + |
| 40 | +- [What is Azure Data Factory Managed Airflow?](concept-managed-airflow.md) |
| 41 | +- [Run an existing pipeline with Airflow](tutorial-run-existing-pipeline-with-airflow.md) |
0 commit comments