@mattfox thanks so much for the help, I made a silly mistake but I am glad it made me more familiar with Mango. I ended up crafting quite the nice CSV importer with some bells and whistles.
J
Posts made by Jerrod Tanner
-
RE: CSV as data points
-
RE: CSV as data points
public class MultiColumnCsvImporter extends AbstractCSVDataSource { private Map<Integer, String> headerMap = new HashMap<Integer, String>(); @Override public void importRow(String[] row, int rowNum) { //Strip out the header row, it does not contain our data if(rowNum == 0){ for(int k = 0; k < row.length; ++k) { this.headerMap.put(k, row[k]); } }else{ //Column 0 is the time Integer Id = Integer.parseInt(row[0]); //Empty additional parameters Map<String, String> extraParams = new HashMap<String,String>(); //For each additional column we will create an Import Point for(int i=1; i<row.length; i++){ String identifier = headerMap.get(i); //Get the identifier from our header map double value = Double.parseDouble(row*); //Create the value NumericImportPoint point = new NumericImportPoint(identifier, value, Id, extraParams); this.parsedPoints.add(point); } } } }
So here you can see data points for only the last row.
-
CSV as data points
Hi, I am very new to Mango and have been working on taking CSV files and making their columns into data points. I used the default multi column CSV importer which works fine, I get my columns as data points inside my CSV data source in Mango. My issue is that it will only create points for the last row. How can I get all or even a select few rows?