- String keyName = TechTypeUtils.getKeyPropertyName(graph, table);
- if (keyName.startsWith("_"))
- keyName = keyName.substring(1);
-
- Map<String, Map<String, String>> map = new HashMap<>();
-
- long ncommas = data.chars().filter(c -> c == ',').count();
- long nsemis = data.chars().filter(c -> c == ';').count();
- char delim = nsemis > ncommas ? ';' : ',';
- StringReader reader = new StringReader(data);
-
- List<CSVRecord> records = new ArrayList<>();
- try {
- CSVFormat format = CSVFormat.newFormat(delim).withQuote('"');
- try (CSVParser parser = format.parse(reader)) {
- Iterator<CSVRecord> it = parser.iterator();
- while (it.hasNext()) {
- records.add(it.next());
- }
- }
- } catch (IOException e) {
- LOGGER.error("Error reading CSV data", e);
+ List<Map<String, String>> records = graph.syncRequest(new TechTypeTableRecords(table), TransientCacheListener.instance());
+ if (records == null || records.size() < 2)