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.enabledvalue totrue - the
resources.references.loadnode
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.enabledvalue totrue - the
resources.references.loadnode
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
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-18