Documentation
DataSave Documentation
Note: The documentation always refers to the latest version of the plugin
[date] | A date in the format of year-month-day, ie “2016-04-26”. |
[time] | Time in 24 hours format, ie “21:03”. |
[random] | A random generated hash/guid, ie “c2fefc7805154ac3bbde4e8479aa9fcd” . |
[counter] | A counter increasing by 1 each time new data is received. Note: The counter resets when the project (re)starts, so be carefull when restarting a project not to get your files appended with new data. |
[data] | The data received by the Data input connector. |
[newline] | Inserts a newline character. This is nice to have if you are saving data in a logging fashion, appending data to the same file. |
Examples, filenames
If you intend to create a log-like functionality, you need to append data each time it arrives and maybe make sure there is a new file created for each day. This file name format would produce the desired result:
[date]_Errorlog.txt
creates files with file names in the style of
2016-08-23_Errorlog.txt
However the following example will produce a new file for each data that arrives:
Log-filename_[counter].txt
creates files with file names in the style of
Log-filename_1.txt
The same phenomenon will occur when using the [random] keyword.
Examples, data format
Note: data format only applies to data from the “Data, text” input
Data format for a log could be:
[date] [time]: [data][newline]
producing content like this:
2016-08-21 18:47: An error message 2016-08-21 19:08: Another error message 2016-08-21 19:10: Yet another error message
At times you just want to save the data as-is. Just use the keyword [data] and it will do only that:
[data]
producing content like this:
This is the data saved, just as it was received by the Data input connector
Plugin Connectors
Connector | Type | Description |
Data, text | input, string | Data that is to be saved in a text format. |
Data, binary | input, base64-encoded string | Data that is to be saved in a binary format. The expected input format is a base64 encoded string, otherwise the plugin will trigger an Error. |
Filename | output, string | The (generated) filename of the file with the saved data |
Error | output, string | If the plugin encounters an error, the error message is sent through this output connector. |
Plugin Settings
Setting | Valuetype | Description |
File path | text | Path where the files will be stored. See above explanation of valid keywords. |
File name | text | File name of the file to save data into. See above explanation of valid keywords. |
Data format | text | The data format for each data received. This will be added to a new or existing file. See above explanation of valid keywords.This only applies when the data is text. |