public class CSVMigrator extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_SIZE |
static char |
DELIMITER |
| Constructor and Description |
|---|
CSVMigrator(Loader loader)
Construct a CSV migrator
|
| Modifier and Type | Method and Description |
|---|---|
String |
graql(String template,
File file)
Migrate all the data in the given file based on the given template.
|
void |
migrate(String template,
File file)
Migrate all the data in the given file based on the given template.
|
CSVMigrator |
setBatchSize(int batchSize)
Set number of rows to migrate in one batch
|
CSVMigrator |
setDelimiter(char delimiter)
Set delimiter the input file will be split on
|
public static final int BATCH_SIZE
public static final char DELIMITER
public CSVMigrator(Loader loader)
loader - loader for the migrator to usepublic CSVMigrator setBatchSize(int batchSize)
batchSize - number of rows to migrate at oncepublic CSVMigrator setDelimiter(char delimiter)
delimiter - character separating columns in inputpublic void migrate(String template, File file)
template - parametrized graql insert queryfile - file containing data to be migratedCopyright © 2016. All rights reserved.