mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? This contribution would to introduce Neo4j Cypher intepreter and at the same time provides base APIs that enable other graph databases (or graph framworks such as GraphX or Giraph). ### What type of PR is it? [Feature] ### Todos * [x] - Provide base APIs to manage graph results (under: org.apache.zeppelin.interpreter.graph.*) * [x] - Create the Neo4j intepreter ### What is the Jira issue? [[ZEPPELIN-2761]](https://issues.apache.org/jira/browse/ZEPPELIN-2761) ### How should this be tested? Donwload and execute [Neo4j](https://neo4j.com/download/?ref=home) v3.x, you can also pull a [Docker image](https://neo4j.com/developer/docker/). In order to execute test cases, if you are running Java 7, you need to also provide an environment variable telling the tests where to find Java 8, because Neo4j-the-database needs it to run. ```bash export NEO4J_JAVA=<path/to/java/home> ``` Use this statement to create a dummy dataset ```bash %neo4j UNWIND range(1,100) as id CREATE (p:Person {id:id, name: "Name " + id, age: id % 3}) WITH collect(p) as people UNWIND people as p1 UNWIND range(1,10) as friend WITH p1, people[(p1.id + friend) % size(people)] as p2 CREATE (p1)-[:KNOWS {years: abs(p2.id - p2.id)}]->(p2) ``` Then you can write some simple queries like: ```bash %neo4j MATCH (p:Person)-[r:KNOWS]-(p1:Person) RETURN p, r, p1 LIMIT 10; ``` ```bash %neo4j MATCH (p:Person)-[r:KNOWS]-(p1:Person) RETURN p.id AS ID_A, p.name AS NAME_A, r.years AS YEARS, p1.id AS ID_B, p1.name AS NAME_B LIMIT 20; ``` ### Video  ### Questions: * Does the licenses files need update? **Yes** * Is there breaking changes for older versions? **No** * Does this needs documentation? **Yes** Author: conker84 <santand@gmail.com> Closes #2478 from conker84/master and squashes the following commits: |
||
|---|---|---|
| .. | ||
| JB | ||
| themes/zeppelin | ||