承接 lephare/import 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lephare/import

最新稳定版本:v2.4.3

Composer 安装命令:

composer require lephare/import

包简介

Import CSV/XLS files

README 文档

README

Resources

Archive

Archive affects imported files/resources when a ImportEvents::POST_COPY event is triggered.

For archive to take effect on a imported resource, you need to explicitly define:

  • the archive.enabled value to true
  • the resources.references.load node
name: stock
source_dir: "var/exchange/in"

archive:
    enabled: true
    dir: "var/exchange/in/foo/stock"
    rotation: 60

resources:
    references:
        tablename: import.stock
        load:
            pattern: "^stock.csv$"

The file will move to a default archives directory in the defined source_dir or in the archive.dir if you explicitly define its value.

The archive.rotation define define the number of files to keep before deletion.

Quarantine

Quarantine affects imported files/resources when a ImportEvents::EXCEPTION event is triggered (before)

For quarantine to take effect on a imported resource, you need to explicitly define:

  • the quarantine.enabled value to true
  • the resources.references.load node

The subsequent stock.csv file will be quarantined if an import exception happen during the import process.

name: stock
source_dir: "var/exchange/in"

quarantine:
    enabled: true
    dir: "var/exchange/in/bar/stock"
    rotation: 60

resources:
    references:
        tablename: import.stock
        load:
            pattern: "^stock.csv$"

The file will move to a default quarantine directory in the defined source_dir or in the quarantine.dir value if you explicitly define its value.

The quarantine.rotation define define the number of files to keep before deletion.

IDE Integration

Beyond validating YAML syntax in your IDE, you can validate the definition of an import configuration using the JSON schema ./lephare-import.schema.json.

This also provides contextual help for autocompletion and when hovering over a YAML key.

统计信息

  • 总下载量: 8.51k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 7
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-18