Hi everyone,
I have many "Number Input Text Field" components grouped together with bindings to a custom property of type Dataset. I need to export this dataset as a csv file for Canary's Historian csv collector to consume.
The csv collector expects the first row of the file to be the tag names of type String and the second row the Engineering Units of type String as well.
I have a script that deconstructs the dataset into rows and appends the engineering units row (as a list) just below the header, but the problem is when I call system.dataset.toDataSet(List[Strings], List[AnyType]).
The conversion fails because the second row contains values of type String while the columns I defined are types double and boolean.
Here's a simplified version of what my csv export should look like:
time | log_1 | log_2 | log_3 | check_1 | log_5 |
---|---|---|---|---|---|
(time) | (double) | (double) | (double) | (bool) | (double) |
10:57 AM | 30.5 | 56 | 67 | 1 | 45 |
11:57 AM | 23.5 | 12 | 67 | 0 | 78 |
13:57 AM | 12.5 | 67 | 6 | 1 | 23 |
14:57 AM | 124 | 213 | 67 | 0 | 90 |
16:57 AM | 78.7 | 43 | 34 | 1 | 12 |
Is there any work around or a better way of doing this?
Anything helps, thank you all!