Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.33 KB

input_csv_reader_task.md

File metadata and controls

46 lines (34 loc) · 1.33 KB

InputCsvReaderTask

Reads a CSV file and iterate on each line, returning an array of key -> values. Skips empty lines.

Task reference

  • Service: CleverAge\ProcessBundle\Task\File\Csv\InputCsvReaderTask
  • Iterable task

Accepted inputs

string: file path

Possible outputs

array: foreach line, it will return a php array where key comes from headers and values are strings. Underlying method is fgetcsv.

Options

Same as CsvReaderTask except following :

Code Type Required Default Description
file_path Removed, use input instead
base_path string ``

Example

clever_age_process:
  configurations:
    process.name:
      entry_point: entrypoint # for upload_and_run process entry_point is required
      tasks:
        entrypoint:
          service: '@CleverAge\ProcessBundle\Task\File\Csv\InputCsvReaderTask'
          options:
            delimiter: '{{ delimiter }}' ## delimiter is contextualized you must add -c delimiter:";" on console execute