@Test public void testEmptyProperty() throws Exception { String csvPath = MinimalCSVImporterTest.class .getResource("/csv/inputEmptyPropertyValues.csv").getPath(); DataSource importer = new MinimalCSVImporter(csvPath, DELIMITER, getConfig(), true); LogicalGraph result = importer.getLogicalGraph(); List<EPGMVertex> lv = new ArrayList<>(); result.getVertices().output(new LocalCollectionOutputFormat<>(lv)); getExecutionEnvironment().execute(); for (EPGMVertex v : lv) { if (v.hasProperty("name")) { assertEquals(2, v.getPropertyCount()); assertFalse(v.hasProperty("value1")); assertTrue(v.hasProperty("value2")); assertFalse(v.hasProperty("value3")); } else if (v.hasProperty("value1")) { assertEquals(2, v.getPropertyCount()); assertFalse(v.hasProperty("name")); assertFalse(v.hasProperty("value2")); assertTrue(v.hasProperty("value3")); } else { fail(); } } }
@Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection(); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection();  }