Node-REDでCSVファイルを読み込む方法です。
#1. csv−to−jsonノードを追加します
-
node-red-contrib-csvtojsonを参照し、
npm install node-red-contrib-csvtojson
でcsv-to-jsonノードを追加します
#2. 下記のフローでCSVファイルを読み込みます
[{"id":"b4537ba5.4f1cb","type":"csv to json ext","z":"21ecb3a8.211334","name":"","version":"0.1","source":"filename","delimiter":",","quote":"\"","escape":"\"","ignoreEmpty":false,"checkType":false,"trim":false,"noheader":false,"includeColumns":"","headers":"","debug":false,"x":430,"y":180,"wires":[["8fc381a8.d96db"]]},{"id":"f1cbf651.2bb4b8","type":"inject","z":"21ecb3a8.211334","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":180,"wires":[["c6dc854f.84919"]]},{"id":"c6dc854f.84919","type":"template","z":"21ecb3a8.211334","name":"","field":"filename","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"test.csv","output":"str","x":270,"y":180,"wires":[["b4537ba5.4f1cb"]]},{"id":"8fc381a8.d96db","type":"debug","z":"21ecb3a8.211334","name":"","active":true,"console":"false","complete":"false","x":610,"y":180,"wires":[]}]