use of ai.grakn.migration.base.Migrator in project grakn by graknlabs.
the class XMLMigratorTest method migrateXMLWithElement.
private static void migrateXMLWithElement(String element, String template) {
// load the schema
MigratorTestUtils.load(session, MigratorTestUtils.getFile("xml", "schema.gql"));
// load the data
Migrator migrator = new MigratorBuilder().setUri(engine.uri()).setKeyspace(keyspace).build();
File xmlFile = MigratorTestUtils.getFile("xml", "data.xml");
XmlMigrator xmlMigrator = new XmlMigrator(xmlFile);
xmlMigrator.element(element);
migrator.load(template, xmlMigrator.convert());
}
Aggregations