public class CSVMigrator extends AbstractMigrator
| Modifier and Type | Field and Description |
|---|---|
static char |
SEPARATOR |
BATCH_SIZE, queryBuilder| Constructor and Description |
|---|
CSVMigrator(String template,
File file)
Construct a CSVMigrator to migrate data in the given file
|
CSVMigrator(String template,
Reader reader)
Construct a CSVMigrator to migrate data in the given Reader
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the reader
|
java.util.stream.Stream<InsertQuery> |
migrate()
Each String in the stream is a CSV file
|
CSVMigrator |
setSeparator(char separator)
Set separator the input file will be split on
|
registerMacro, stream, template, validValuepublic static final char SEPARATOR
public CSVMigrator(String template, File file)
template - parametrized graql insert queryfile - file with the data to be migratedpublic CSVMigrator setSeparator(char separator)
separator - character separating columns in inputpublic java.util.stream.Stream<InsertQuery> migrate()
public void close()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.