# Extract data from Node-Red

**URL:** https://discourse.nodered.org/t/extract-data-from-node-red/74606
**Category:** Dashboard
**Tags:** node-red-dashboard, database
**Created:** [2 February 2023 13:36 UTC](https://discourse.nodered.org/t/extract-data-from-node-red/74606 "2023-02-02T13:36:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)
#### Post date: [2 February 2023 13:36 UTC](https://discourse.nodered.org/t/extract-data-from-node-red/74606/1 "2023-02-02T13:36:16Z")

</div>

hello, so I am collecting a information from a plc and operators running a line. so far I have this viewable live. I would like save the data captured at the end of the shift into a database. select the data and be able to see what the performance of the machine was on that date, be able to look at the chart an what not.

how would i go about putting this data into such a database?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e27bdd5ad3354891735fd58e28f2536ac0d04c0a.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [2 February 2023 14:59 UTC](https://discourse.nodered.org/t/extract-data-from-node-red/74606/2 "2023-02-02T14:59:50Z")

</div>

There are many options but as this is time-based IoT type data, many of use use InfluxDB for that. You can then use Grafana to build chart dashboards direct from the db.

But rather than trying to hold onto the data until the end of a shift, it is much easier to send it to the db as it arrives in Node-RED.

There is a contributed node to help write data to InfluxDB. Just note that a timeseries db like InfluxDB may look superficially like a SQL DB but it isn't and this can catch people out. Take some time to play with InfluxDB and become a little familiar with its layout and features and work out what structure you want in your data. Once you've got the basics, there are plenty of us on the forum who use it and can help with the tweaks you will eventually want in order to make everything robust.

---

<div class="post-metadata">

### Author: ![tgottie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tgottie](https://discourse.nodered.org/u/tgottie)
#### Post date: [2 February 2023 15:13 UTC](https://discourse.nodered.org/t/extract-data-from-node-red/74606/3 "2023-02-02T15:13:43Z")

</div>

awesome, i will give this a try! it is definitely much better to catch it as it arrives. my thought process was so that it would be viewable at later dates!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 March 2023 15:14 UTC](https://discourse.nodered.org/t/extract-data-from-node-red/74606/4 "2023-03-04T15:14:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
