oliverde8/php-etl-easyadmin-bundle

添加接口以查看执行情况并运行 php-etl 的执行

v1.0.0 2022-03-06 17:25 UTC

This package is auto-updated.

Last update: 2024-09-05 15:30:01 UTC


README

Php etl easy admin bundle 允许在 symfony 中使用 Oliver's PHP Etl 库。同时添加了 easy admin 的集成,以便查看执行列表

List of etl executions

并且还可以查看每个执行的详细信息。每个执行的日志以及每个执行处理过的文件也可以在这里找到

List of etl executions

同时提供了一个仪表板来查看当前状态。

Dashboard of etl executions

安装

  1. 使用 composer 安装

  2. /config/ 中创建一个名为 etl 的目录

  3. 启用捆绑

    \Oliverde8\PhpEtlBundle\Oliverde8PhpEtlEasyAdminBundle::class => ['all' => true],
  1. 添加到 easy admin
yield MenuItem::linktoRoute("Job Dashboard", 'fas fa-chart-bar', "etl_execution_dashboard");
yield MenuItem::linkToCrud('Etl Executions', 'fas fa-list', EtlExecution::class);
  1. 启用路由
etl_bundle:
  resource: '@Oliverde8PhpEtlEasyAdminBundle/Controller'
  type: annotation
  prefix: /admin
  1. 可选:如果希望允许用户从 easy admin 面板执行,则启用队列
framework:
  messenger:
    routing:
        "Oliverde8\PhpEtlBundle\Message\EtlExecutionMessage": async
  1. 可选:通过编辑 monolog.yaml 启用为每个日志创建单独的文件
etl:
    type: service
    id: Oliverde8\PhpEtlBundle\Services\ChainExecutionLogger
    level: debug
    channels: ["!event"]

用法

请查看 Php Etl Bundle 的文档

有关 etl 的工作原理以及如何创建操作的信息,请查看 Php Etl 文档

待办事项

  • 添加从界面创建 etl 链定义的可能性。