Hi everyone,
I want to store live data in windows PC via .csv file format. In this file every day change new file with date and time . Do you have any sample flow code for that. Please support how to write .csv file. Here, I am using windows 10 Pc.
This has been asked & answered a lot but I appreciate the search terms might make is difficult to find.
Try searching daily filename in the forum, it turns up a few solutions.
I understand CSV might look like a good solution, but I have to deal with those every now and then, and in my opinion it is much better and more efficient to set up a mySQL DB on the PC and use it to store any logs you want. They can be retrieved easily, and they can be accessed both for reading and writing by multiple users (more or less) simultaneously. They can be indexed by several fields, and the results are easy to filter if you need to.
Unlike a DB, a CSV file will throw an error if you attempt to read and write at the same time, and if you have a lot of data it can be extremely cumbersome to filter and search the results you need, specially if those are non-consecutive.
If I were you, I'd go for a DB instead of CSV without even thinking. I've had enough trouble in my industrial applications because of companies that decided to log everything in .csv files that are nearly useless to retrieve specific data (as in, how much time the machine has been up and running?).
Anyway, it's your choice, but that is my advice. It will save you some problems down the line, unless you're planning on not checking the logs ever.
Hi OriolFM,
Thank you so much to sharing this information while, mySQL DB installing process consume more time. Also, I want know the mySQL DB install procedure and how to send data to mySQL DB via node.
How to install mysql is not a node-red issue.
In node-red, to access the db you can search the node-red flows site. In particular there is node-red-node-mysql
Hi Colin,
Thank you. I will check and revert back.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.