File write node

I’m using a file write node in an edge workflow and I need some examples of how to construct the File content properly with new line return , timestamp e.t.c.

Hey @Lars_Andersson,

I’m working on getting you an example right now. I’ll reply in this thread when I have one!

Thanks,
Heath

@Lars_Andersson,

Would you be able to share with me what you’ve tried? Are you seeing any issues or errors when trying to write to a file?

Thank you,
Heath

I can get time stamp and data, but I haven’t been able to control when a new line should start.

an example code would be great.

@Lars_Andersson,

It’s really hard to provide an example for a use case we aren’t quite sure about yet.

@Heath asked:

Would you be able to share with me what you’ve tried? Are you seeing any issues or errors when trying to write to a file?

If you could provide more details around what problem you’re trying to solve? Why do you need to create the file? What data is going into the file? How do you plan to get the data back out?

More details about what you’re doing will help us provide the best path forward.

Sorry, I could have explained better.
I’m having the edge workflow write a file with multiple data points sampled at a subsecond rate.
I would like to be able to download that locally created file as a CSV using a page created on edge as a HTTP response.

Is that enough information?

@Lars_Andersson,

It’s possible to do, but it would really be pushing the scope of what the webserver on the Edge Agent was designed for and very difficult to maintain.

It’s possible to continually write to a file with the File: Write Node:

“Append my content to the file if it exist” will keep adding to the file.

Then, you could use the File: Read Node to do something with that file. You could report it as a blob, or send it to the cloud for further processing and expose an Experience to access the data. That would be the recommended path forward.

You know I like pushing the limits…:wink:
I am currently writing to a file, but then I got stuck at how I could properly format the file.
In the end, all I want to do is to preprocess some subsecond sampled data, (which works fine), do maybe some min, max, average calcs, during a minute worth of data, then post those 3 aggregated values to the cloud as attributes.