GitHub user conker84 opened a pull request:

    https://github.com/apache/zeppelin/pull/1582

    [ZEPPELIN-1604] Add Neo4j interpreter and Network visualization

    ### What is this PR for?
    This contribution would to introduce Neo4j Cypher intepreter and the new 
network visualization;
    at the same time would provide base APIs that allow other graph databases 
(or graph framworks such as GraphX or Giraph).
    
    ### What type of PR is it?
    [Feature]
    
    ### Todos
    * [x] - Create the network visualization (using 
[Sigma.js](http://sigmajs.org/))
    * [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-1604]](https://issues.apache.org/jira/browse/ZEPPELIN-1604)
    
    ### 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
    %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;
    ```
    ### Screenshots
    ![Simple cypher query network 
visualization](https://raw.githubusercontent.com/conker84/zeppelin/master/docs/assets/themes/zeppelin/img/docs-img/neo4j-network-result.png)
    
    ![Simple cypher query tabular 
visualization](https://raw.githubusercontent.com/conker84/zeppelin/master/docs/assets/themes/zeppelin/img/docs-img/neo4j-tabular-result.png)
    
    ### Video
    
![localhost_9000___-google-chrome-01_11_2016-15_44_24](https://cloud.githubusercontent.com/assets/1833335/19947893/6e83ec66-a14a-11e6-978a-c85c6929209a.gif)
    
    ### Questions:
    * Does the licenses files need update? **Yes**
    * Is there breaking changes for older versions? **No**
    * Does this needs documentation? **Yes**. I have create the neo4j.md file 
in /docs/intepreter folder

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/conker84/zeppelin master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1582.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1582
    
----
commit 4e685ccf2bc23c41f7d48569af584ee535feb474
Author: conker84 <sant...@gmail.com>
Date:   2016-10-26T20:07:17Z

    First commit

commit acc4307dd1b7f90dedf76ecb8a4b27e93658399f
Author: conker84 <sant...@gmail.com>
Date:   2016-10-26T21:40:47Z

    Added the graph footer to provide detailed data information

commit 72f12036047e8fdd518712527380730ac139988d
Author: conker84 <sant...@gmail.com>
Date:   2016-10-26T22:15:39Z

    Code clean

commit bd1b0f23fd1b5e35e5a3c125fff50abccebc4ba3
Author: conker84 <sant...@gmail.com>
Date:   2016-10-29T13:37:30Z

    Changes:
    
    Move the GraphResult to zeppelin-intepreter package in order to use as
    base api for other graph databases.
    Added neo4.md to the documentation.
    Prevented the nodes overlap.

commit 251fba0a16ded784be33995ba83abe0cb23f388a
Author: conker84 <sant...@gmail.com>
Date:   2016-10-29T13:43:02Z

    Added doc images

commit bf68eb6b6ee28de7e9fa8c67c223130d7b802949
Author: conker84 <sant...@gmail.com>
Date:   2016-10-29T13:45:27Z

    doc fix

commit c8249b6c45c1b5957957ea3cac13d8fb4c17ef5d
Author: conker84 <sant...@gmail.com>
Date:   2016-11-01T13:43:07Z

    Removed Jackson Dependencies

commit d5997778c2edf9b75cef66d36ec95bf5a14fc5bb
Author: conker84 <sant...@gmail.com>
Date:   2016-11-01T14:04:59Z

    reactivate "goog-webfont-dl" task

commit 9aefddfc5a95fb469f21cec1a968cc917020dea5
Author: conker84 <sant...@gmail.com>
Date:   2016-11-02T13:47:48Z

    Added tests and changed network icon

commit 793f72922cd9acbe4a5cbf26986d4c4ceedf9df2
Author: conker84 <sant...@gmail.com>
Date:   2016-11-02T21:07:05Z

    Bugfixes

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to