php-etl/csv-plugin

Plugins for CSV Extractor and Loader

Installs: 3 806

Dependents: 0

Suggesters: 1

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 2

Type:gyroscops-plugin

v0.6.3 2023-09-14 07:19 UTC

README

This package aims at integrating the CSV reader and writer into the

Quality (PHPStan lvl 4) PHPUnit PHPStan level 5 PHPStan level 6 PHPStan level 7 PHPStan level 8 PHP

Pipeline stack.

Principles

The tools in this library will produce executable PHP sources, using an intermediate Abstract Syntax Tree from nikic/php-parser. This intermediate format helps you combine the code produced by this library with other packages from Middleware.

Installation

composer require php-etl/csv-plugin

Usage

Example of a config file. Reads input.csv, writes output.csv, logs error in system's stderr.

csv:
    extractor:
        file_path: input.csv
        delimiter: ';'
        enclosure: '"'
        escape: '\\'
    loader:
        file_path: output.csv
        delimiter: ','
        enclosure: '"'
        escape: '\\'
    logger:
        type: stderr

Examples of configuration files

See also