Creating rows based on folder (N4 CSV driver)


#1

We have a customer who wants to organize the exported data based on the timestamp and another category. So by default, all unique points will be exported in a separate column.
image

Instead, they want to have a unique row for each type of device similar to the image below.
image

Is this possible through the driver as I couldn’t find anything related in the manual?


#2

The second example shown is actually the correct format you would want to use for the csv driver. There is a demo station provided with the driver download that has a similar file structure to show how to import a csv file. An overview of what that looks like is:

  1. Define the import style (file, ftp, etc)
  2. Poll the file from the columns section of the import
  3. Choose what columns you want to import. Make sure to setup the timestamp column appropriately with the correct format
  4. Add histories to the columns and configure them to use the timestamp column you created instead of the default Time option.

After you set that up, importing will create a history for each value in each column imported at the timestamp value for that row.


#3

Thanks for the prompt response Jonathan. I think the points you mentioned are only applicable for importing CSV data, but the objective is to organize the exported data in CSV.

By default CsvHistoryExport, while using the merge feature, will combine and time-align multiple histories into one CSV file, without any option for formatting. Would it be possible to export for example six history points in the format I posted previously? The only options I can observe are shown below.
csvhistoryexport

Differences from default:

  • Additional column denoting the category of the history point
  • Repeated timestamps (rows) to denote points from two different categories at the same instance.

#4

Must have missed the export side of things. There’s no way to adjust the format of the export except with those options. The intention is only to send the raw data without providing context. The receiving end needs to be aware of what the data it is receiving to place the appropriate context around it. This means there’s no additional meta data around the trend data, just the data and the source information.