Help building a csv import class
i am reading the mang help file about csv class. It is really not clear for me.
I have this file see attachment link text
With powershell i selct the file of today and copy the file in to another directory with a new name that is always the same so mango can findthe file.
I would like to use the last line that is written for my data points.
The system status is written at the end of the log period
That needs to be read as well for the datapoint,
can some one help me with the csv import class file ?
thanks in advanced
phildunlap last edited by phildunlap
Are you referring to the Data File Data Source?
If you only want the last row, you'll either want to know how many rows there are and generate the list of import points on then, or create a new 'parsedPoints' list at each row. The abstract "importRow" method will give you one line of Strings split by commas. Loop over the values in the array, and for each one
this.parsedPoints.add(new AlphanumericImportPoint( "Point number: " + n, data[n] , now.getTime() ));
You can find a good example in the module's folder inside your Mango. Mango/web/modules/dataFile/web/CompilingGrounds/CSV