public class SQLMigrator extends AbstractMigrator
BATCH_SIZE, queryBuilder| Constructor and Description |
|---|
SQLMigrator(String query,
String template,
Connection connection)
Construct a SQL migrator to migrate data from the given DB
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
SQL Migrator has nothing to close
|
Map<String,Object> |
convertToValidValues(Map<String,Object> data)
Convert values to be valid - removing nulls and changing to supported types
|
java.util.stream.Stream<InsertQuery> |
migrate()
Migrate the results of the SQL statement with the provided template
|
registerMacro, stream, template, validValuepublic SQLMigrator(String query, String template, Connection connection)
query - SQL query to gather data from databasetemplate - parametrized graql insert queryconnection - JDBC connection to the SQL databasepublic java.util.stream.Stream<InsertQuery> migrate()
public void close()
Copyright © 2016 Grakn Labs Ltd. All rights reserved.