"CSV" parser for node-red. Original work by IBM dosnt' fit my needs. Buggy with multi-line and no huge file support. Here is a version working with a state for the art library (csv-parse) and working with my bigfile library
npm install node-red-contrib-bigcsv
Known issue: work with node v4
Core provides a CSV parser. This one is able to parse multi-line.
Principles for Big Nodes
See biglib for details on Big Nodes.
Big Lib and subsequent
Big Nodes are a family of nodes built for my own purpose. They are all designed to help me build a complete process for production purposes. For that I needed nodes able to:
- Flow big volume of data (memory control, work with buffers)
- Work with a flow of blocks (buffers) (multiple payload within a single job)
- Tell what they are doing with extended use of statuses (color/message)
- Use their second output for flow control (start/stop/running/status)
- Reuse messages in order to propagate _msgid, topic
- Depends on state of the art libraries for parsing (csv, xml, xlsxs, line, ...)
- Acts as filters by default (1 payload = 1 action) or data generators (block flow)
All functionnalities are built under a library named
biglib and all
Big Nodes rely on it
Big CSV is a filter node for node-red to transform data into csv objects, one message per line. It uses the "csv-parse" library
It works as a filter node that means it takes in the output of a "big file" node or any block node. It's able to read a file by itself to send lines
It has several options as csv-parse offers them: (see http://csv.adaltas.com/parse/)
- delimiter (default comma)
- rowDelimiter (default unix)
- quote (default double quotes)
- trim (default)
- ltrim (default false)
- rtrim (default false)
csv-parse CSV parsing implementing the Node.js stream.Transform API
biglib library for building node-red flows that supports blocks, high volume
Example flow files
Try pasting in the flow file below that shows the node behaviour
- Jacques W
This code is Open Source under an Apache 2 License.
You may not use this code except in compliance with the License. You may obtain an original copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Please see the License for the specific language governing permissions and limitations under the License.
Feedback and Support
Please report any issues or suggestions via the Github Issues list for this repository.
For more information, feedback, or community support see the Node-Red Google groups forum at https://groups.google.com/forum/#!forum/node-red