# Writing and Processing Data to File

**URL:** https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481
**Category:** General
**Created:** [13 February 2024 11:19 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481 "2024-02-13T11:19:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bgultekin](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bgultekin](https://discourse.nodered.org/u/bgultekin)
#### Post date: [13 February 2024 11:19 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/1 "2024-02-13T11:19:29Z")

</div>

Hello,

I will save the data in node-red to a file and then send the data here to sqle according to the old to new. Then I will delete the data I sent from the file.

I would appreciate if you can help.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 February 2024 12:01 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/2 "2024-02-13T12:01:28Z")

</div>

Hi.

> [@bgultekin](#):
>
> I will save the data in node-red to a file

What data?

What format?

> [@bgultekin](#):
>
> and then send the data here to sqle

what is sqle?

> [@bgultekin](#):
>
> Then I will delete the data I sent from the file

Is there a reason for writing to file in the first place?

> [@bgultekin](#):
>
> I would appreciate if you can help

What have you done so far? where are you stuck?

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [13 February 2024 19:36 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/3 "2024-02-13T19:36:34Z")

</div>

Another candidate for a flimflam valve I think 😜

---

<div class="post-metadata">

### Author: ![bgultekin](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bgultekin](https://discourse.nodered.org/u/bgultekin)
#### Post date: [27 February 2024 04:35 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/4 "2024-02-27T04:35:17Z")

</div>

Hello I collect data via Modbus TCP. We can record in the format we want. I am using mssql.

So far, I am writing the data to a file, but I could not write and delete the file sequentially.

In addition, I am currently accumulating the data in an array. I am writing one by one from there, but this fills the ram. And node red crashes (I think this is it).

Thank you for your support.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [27 February 2024 07:45 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/5 "2024-02-27T07:45:12Z")

</div>

> [@bgultekin](#):
>
> So far, I am writing the data to a file, but I could not write and delete the file sequentially

Can you clarify this. Provide a screenshot of the flow. Also, provide a screenshot of the write node configuration.

---

<div class="post-metadata">

### Author: ![bgultekin](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bgultekin](https://discourse.nodered.org/u/bgultekin)
#### Post date: [27 February 2024 12:53 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/6 "2024-02-27T12:53:36Z")

</div>

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

I write the data coming from TCP with File node. There's a total of 6 groups like this.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d60b7b0bbb3765266744b34e241e62e01cd11498.png)

Then I transfer them to MSSQL as shown in the image (Currently done with array). How do I use and delete the data in the file after this part?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5ab49346e78981f0fc1d814a7cbca229125c5b5d.png)

"Makina5\_Array\_Buffer" function node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b64e229d07149d8f1863562c1ad124753b13951b.png)

---

<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: [27 May 2024 12:54 UTC](https://discourse.nodered.org/t/writing-and-processing-data-to-file/85481/7 "2024-05-27T12:54:19Z")

</div>

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