use of uk.gov.gchq.gaffer.graph.hook.migrate.SchemaMigration in project Gaffer by gchq.
the class SchemaMigrationIT method createMigration.
private SchemaMigration createMigration() {
final SchemaMigration migration = new SchemaMigration();
migration.setEntities(Collections.singletonList(new MigrateElement(MigrateElement.ElementType.ENTITY, "entityOld", "entityNew", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build())));
migration.setEdges(Arrays.asList(new MigrateElement(MigrateElement.ElementType.EDGE, "edgeOld", "edgeNew", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build()), new MigrateElement(MigrateElement.ElementType.EDGE, "edgeAgg", "edgeAggNew", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build()), new MigrateElement(MigrateElement.ElementType.EDGE, "oldEdgePostOpAgg", "newEdgePostOpAgg", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build()), new MigrateElement(MigrateElement.ElementType.EDGE, "oldEdgeAggBeforePostFilter", "newEdgeAggBeforePostFilter", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build()), new MigrateElement(MigrateElement.ElementType.EDGE, "edgeOldOpChain", "edgeNewOpChain", new ElementTransformer.Builder().select("count").execute(new ToLong()).project("count").build(), new ElementTransformer.Builder().select("count").execute(new ToInteger()).project("count").build())));
return migration;
}
Aggregations