PHPackages                             bluspark/airflow-dag-run-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bluspark/airflow-dag-run-bundle

ActiveSymfony-bundle

bluspark/airflow-dag-run-bundle
===============================

Provide an HTTP Client to manage DAG run from Airflow

v0.0.6(10mo ago)07.7k↓50%CECILL-BPHPPHP &gt;=8.1

Since May 21Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/BlusparkTeam/airflow-dag-run-bundle)[ Packagist](https://packagist.org/packages/bluspark/airflow-dag-run-bundle)[ RSS](/packages/bluspark-airflow-dag-run-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (9)Versions (7)Used By (0)

Airflow Dag run Symfony bundle
==============================

[](#airflow-dag-run-symfony-bundle)

This bundle provide a way to trigger new dag on [Apache Airflow](https://airflow.apache.org/) run to generate export files and request asynchronously for the generated export filename.

Installation
------------

[](#installation)

With composer:

```
composer require bluspark/airflow-dag-run-bundle
```

Configuration
-------------

[](#configuration)

Make sure your bundle has been enabled in your `config/bundles.php` file (automatically done if you're using Symfony Flex)

```
# config/bundles.php
return [
    ...
    Bluspark\AirflowDagRunBundle\BlusparkAirflowDagRunBundle::class => ['all' => true],
];
```

Add a `bluspark_airflow_dag_run.yaml` file in your `config/packages` directory to define the following required parameters:

```
bluspark_airflow_dag_run:
  airflow_host: https://from-config.example.org
  airflow_dag_ids: your-dag-id # or name:dag-id,anotherName:another-dag-id
  airflow_username: user
  airflow_password: !ChangeMe!
```

You can have more details about the configuration parameters by running this command in your Symfony project:

```
bin/console config:dump bluspark_airflow_dag_run
```

Finally, add in your `config/packages/messenger.yaml` file the transport of your choice which will handle the success message dispatched by the bundle (as explained below):

```
framework:
  messenger:

    routing:
      'Bluspark\AirflowDagRunBundle\Scheduler\Message\DagRunMessageExecuted': my_project_transport
```

> **If you're using Symfony &lt; 6.4**, the bundle won't use `Scheduler` but a standard message dispatched through a `MessengerBus` instead.
> If so, you must declare **all** the bundl'es messages for the transport management :
>
> ```
> framework:
>  messenger:
>
>    routing:
>      'Bluspark\AirflowDagRunBundle\Scheduler\Message\*': my_project_transport
> ```

Usage
-----

[](#usage)

The bundle provide a bridge service class that you can use in your project through using dependency injection.

```
namespace App\Controller;

use Bluspark\AirflowDagRunBundle\Contracts\Bridge\AirflowDagBridgeInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

final class YourController extends AbstractController
{
    #[Route(path: '/my-export-route')]
    public function __invoke(AirflowDagBridgeInterface $airflowDagBridge): Response
    {
        // ... build your $config array with your export parameters
        $dagRunStatus = $airflowDagBridge->requestNewExportFile($config);

        // or if you passed an array of dagIds like "name:dag-id,anotherName:another-dag-id"
        $dagRunStatus = $airflowDagBridge->requestNewExportFile($config, 'anotherName');
    }
}
```

Authorized parameters for the export request are:

- `format`: format expected for the export file (eg: "csv", "xls")
- `export`: data type for your export (eg: 'pickup', 'producer', ...)
- `search`: array of filters you want to apply for data included in your export file
- `extra`: array of data that you want to use or pass throughout all the export process (e.g. an email to notify on success)
- `raw`: array of data only sent and used in request (eg: initial filters before convertion)
- `lang`: language to use for the export file (eg: "fr", "en")

No other configuration parameters are considered valid.
Once the export file has been requested on Airflow, the bundle uses a [Scheduler](https://symfony.com/doc/current/scheduler.html) recurring message to check every 30 seconds if the file has been successfully created, with its own handler. Then, the bundle dispatch using [Symfony Messenger](https://symfony.com/doc/current/messenger.html) component a `Bluspark\AirflowDagRunBundle\Message\DagRunMessageExecuted` message with a `filename` property containing the now available file on S3 You will have to implement the handler for the `Bluspark\AirflowDagRunBundle\Message\DagRunMessageExecuted` message with your own logic inside your project.

To run the Scheduler transport used by this bundle, do not forget to run the following command (**only for Symfony version &gt;= 6.4**)

```
bin/console messenger:consume scheduler_airflow_dag_run
```

Messages
--------

[](#messages)

The bundle implements 2 different messages that need to be consumed :

- a `Bluspark\AirflowDagRunBundle\Message\DagRunChecker` message meant to be consumed by the `scheduler_airflow_dag_run` Schedule (provided by the bundle)
- a `Bluspark\AirflowDagRunBundle\Message\DagRunMessageExecuted` message meant to be consumed by the Messenger transport of your choice in your project

License
-------

[](#license)

This project is licensed under the CeCILL-B License - see the [LICENSE](LICENSE) file for details.

Sponsors
--------

[](#sponsors)

[![Bluspark logo](./docs/bluspark_logo.jpeg)](./docs/bluspark_logo.jpeg)

Bluspark is a Saas application to operate infrastructure of agglomerations and cities. It is a complete solution to manage the life cycle of your infrastructure, from the design to the maintenance.

[![Consoneo logo](./docs/consoneo_logo.jpeg)](./docs/consoneo_logo.jpeg)

The digital SaaS platform for financing and managing energy renovation aid

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance53

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~80 days

Recently: every ~100 days

Total

6

Last Release

326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecd3f699bbfa9f96de09f237059302d7ff8e27b9d3af34e770827f481f9497ea?d=identicon)[Halleck](/maintainers/Halleck)

---

Top Contributors

[![feymo](https://avatars.githubusercontent.com/u/60115888?v=4)](https://github.com/feymo "feymo (15 commits)")[![gb-bluspark](https://avatars.githubusercontent.com/u/149696718?v=4)](https://github.com/gb-bluspark "gb-bluspark (6 commits)")[![EroyerBS](https://avatars.githubusercontent.com/u/61686866?v=4)](https://github.com/EroyerBS "EroyerBS (3 commits)")[![Halleck45](https://avatars.githubusercontent.com/u/1076296?v=4)](https://github.com/Halleck45 "Halleck45 (3 commits)")[![Valmonzo](https://avatars.githubusercontent.com/u/105214243?v=4)](https://github.com/Valmonzo "Valmonzo (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bluspark-airflow-dag-run-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bluspark-airflow-dag-run-bundle/health.svg)](https://phpackages.com/packages/bluspark-airflow-dag-run-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
