apoc.graph.fromDocument
procedureThe apoc.graph.*
are a set of procedures that allow transforming custom data formats into Graphs. The last procedure that we created is apoc.graph.fromDocument
that allows creating graphs from maps, JSON objects and JSON strings. In this article, we’ll talk about, why you should use it and what are the benefits of using this procedure while you’re dealing with JSON-like formats.
A JSON is basically a tree-graph
So the following JSON:
{
"id": 1,
"type": "artist",
"name": "Genesis",
"albums": [{
"type": "album",
"id": 1,
"producer": "Jonathan King",
"title": "From Genesis to Revelation"
}]
}
Can be turned into a graph like…
This article is the third part of the Leveraging Neo4j Streams series (Part 1 is here, Part 2 is here). In it, I’ll show you how to bring Neo4j into your Apache Kafka flow by using the streams procedures available with Neo4j Streams.
In order to show how to integrate them, simplify the integration, and let you test the whole project by hand, I’ll use Apache Zeppelin, a notebook runner that simply allows you to natively interact with Neo4j.
Starting from Neo4j 3.x, the concept of user-defined procedures and functions was introduced. …
The idea is to allow a user to export all data, an subgraph, the result of a query or a collections of paths into to an importable cypher-script, which you could import again by piping it to cypher-shell on the command-line. Very similar to using SQL based import scripts.
cat script.cypher | bin/cypher-shell -u username -p password
Please note that for maximum performance you need to use cypher-shell version 1.1.9 or later, which got client-side parameter parsing, instead of sending the parameter to the server to be evaluated. …
This article is the second part of the Leveraging Neo4j Streams series (Part 1 is here). I’ll show how to bring Neo4j into your Apache Kafka flow by using the Sink module of the Neo4j Streams project in combination with Apache Spark’s Structured Streaming Apis.
In order to show how to integrate them, simplify the integration, and let you test the whole project yourself, I’ll use Apache Zeppelin — a notebook runner that simply allows you to natively interact with Neo4j.
In this article, we’ll show how to create a Just-In-Time Data Warehouse by using Neo4j and the Neo4j Streams module with Apache Spark’s Structured Streaming Apis and Apache Kafka.
In order to show how to integrate them, simplify the integration, and let you test the whole project by hand, I’ll use Apache Zeppelin a notebook runner that simply allows to natively interact with Neo4j.
Interactive notebooks are very popular today. Whether you use them in data engineering (data processing) or for data science projects (data analytics/ML) they are a “de facto” standard, and are replacing slideshow presentations in many organizations. Besides Jupyter Notebooks, Apache Zeppelin is also widely used, especially because it integrates well with Apache Spark and other Big Data systems.
Starting from my experiences of using Zeppelin and Neo4j in different contexts I developed the Zeppelin Interpreter that connects to Neo4j in order to query and display the graph data directly in the notebook (both in graph and tabular formats). This interpreter is now part of Zepplin 0.8 …
“A web-based notebook that enables interactive data analytics.
You can make beautiful data-driven, interactive and collaborative documents with SQL, Scala and more.”
(taken from Apache Zeppelin official website)
I felt in love with Apache Zeppelin for it’s native support for Apache Spark, it allows to create powerful (big) data analytics dashboard really fast.
After some weeks spent using it with Apache Spark that “more” intrigued me, so i have tried to integrate Zeppelin with Neo4j, a graph database that i have used in an epidemiology related project.
The full notebook of this experiment is here:
To achive my goal i have used only pure javascript language directly on Zeppeling Notebook, using just one (at most two)…
About