Closed claustres closed 1 year ago
Use the readCSVhook with the following options:
readCSV
{ header: true, delimiter: ';', transform: { omit: [ 'opening_date', 'pack' ], unitMapping: { station_id: [Object] } } }
JSON transformation is applied.
JSON transformation is not applied.
In the hook the options seem to have been modified by Papa.parse() when retrieved in the end event of the stream:
Papa.parse()
end
{ header: true, delimiter: ';', transform: false, dynamicTyping: false }
We should probably clone options before sending it to Papa.parse().
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 2.4
NodeJS version: 16
Operating System: Windows
Steps to reproduce
Use the
readCSV
hook with the following options:Expected behavior
JSON transformation is applied.
Actual behavior
JSON transformation is not applied.
In the hook the options seem to have been modified by
Papa.parse()
when retrieved in theend
event of the stream:We should probably clone options before sending it to
Papa.parse()
.System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): 2.4
NodeJS version: 16
Operating System: Windows