openreferral / hsds-transformer

Convert data into valid Human Service Data Specification (HSDS) datapackages. (Produced by the Open Referral Initiative.)
MIT License
11 stars 5 forks source link

Add ability to append multiple input fields to one output column #24

Closed switzersc closed 5 years ago

switzersc commented 5 years ago

We want to use multiple input fields in one output field. For example, in the services model in HSDS, there is an application_process text field. In our fixture input data, the services.csv contains multiple fields that are relevant for the application process: Application form link, Process for applying by email, Process for applying by phone``Process for applying online, Process for walk-ins. We should have a way to append all of these fields into a single output column.

This is what I'm thinking for an addition to services in mapping.yaml:

Process for applying by email
  model: services
  field: application_process
  append: true
Process for applying by phone
  model: services
  field: application_process
  append: true
Process for applying online
  model: services
  field: application_process
  append: true
Process for walk-ins
  model: services
  field: application_process
  append: true

and the append: true field indicates that these should be appended to the output field, so that all the above are added into the same text string in application_process.

switzersc commented 5 years ago

Completed with #31