Skip to content

Instantly share code, notes, and snippets.

@nickname55
Forked from pingles/neo4j_tap.java
Created February 13, 2018 16:02
Show Gist options
  • Save nickname55/2c2a7dbbe690063c7d386880979dc408 to your computer and use it in GitHub Desktop.
Save nickname55/2c2a7dbbe690063c7d386880979dc408 to your computer and use it in GitHub Desktop.
HadoopPlatform platform = new HadoopPlatform();
Fields sourceFields = new Fields("name", "nationality");
Tap source = platform.getDelimitedFile(sourceFields, ",", filename);
NodeScheme scheme = new NodeScheme(sourceFields);
Tap sink = new Neo4jTap("http://neo4j.rest.co/db/data", scheme);
Pipe pipe = new Each("Flow nodes", sourceFields, new Identity());
Flow flow = platform.getFlowConnector().connect(source, sink, pipe);
flow.complete();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment