This repository contains a custom Apache Airflow provider for integrating with Magento 2. The provider enables the automation of various Magento-related tasks using Airflow, such as order synchronization and data exports.
- Magento Integration: Seamlessly connect to Magento 2 using OAuth1 authentication for secure API requests.
- Custom Airflow Hooks: Simplifies interaction with Magento's REST API and GraphQL.
- Custom Airflow Operators: Provides an operator to fetch and manipulate orders and other data from Magento.
airflow_magento_provider/hooks/magento.py
: Contains theMagentoHook
class, which handles OAuth authentication and API requests to Magento.airflow_magento_provider/operators/rest.py
: Contains theMagentoRestOperator
class.airflow_magento_provider/operators/graphql.py
: Contains theMagentoGraphQLOperator
class.example_dags/
: Example DAGs for understanding Magento Operators and Hooks.
-
Install the provider: Clone the repository and install the package using pip:
git clone https://github.com/sivajik34/magento-airflow.git cd apache_airflow_provider_magento pip install .
Also, you can install it from https://pypi.org/project/apache-airflow-provider-magento/ pip install apache-airflow-provider-magento
-
Set up Airflow connections:
- Create an Airflow connection with your Magento credentials( System -> Integration -> Add new Integration).
-
Create a DAG:
- Set up your data synchronization pipeline by referring to the example DAGs in the
example_dags
directory.
- Set up your data synchronization pipeline by referring to the example DAGs in the
- Apache Airflow 2.x
- Magento 2.4.x
- Python 3.8+
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.