Home » Tag Archives: Neo4j

Tag Archives: Neo4j

Neo4j: Cypher – Property values can only be of primitive types or arrays thereof

I ran into an interesting Cypher error message earlier this week while trying to create an array property on a node which I thought I’d share. This was the Cypher query I wrote: CREATE (:Person {id: [1, "mark", 2.0]}) which results in this error: Neo.ClientError.Statement.TypeError Property values can only be of primitive types or arrays thereof. We actually are storing ...

Read More »

Kubernetes 1.8: Using Cronjobs to take Neo4j backups

With the release of Kubernetes 1.8 Cronjobs have graduated to beta, which means we can now more easily run Neo4j backup jobs against Kubernetes clusters. Before we learn how to write a Cronjob let’s first create a local Kubernetes cluster and deploy Neo4j. Spinup Kubernetes & Helm minikube start --memory 8192 helm init && kubectl rollout status -w deployment/tiller-deploy --namespace=kube-system ...

Read More »

Kubernetes: Copy a dataset to a StatefulSet’s PersistentVolume

Neo4j Clusters on Kubernetes This posts assumes that we’re familiar with deploying Neo4j on Kubernetes. I wrote an article on the Neo4j blog explaining this in more detail. The StatefulSet we create for our core servers require persistent storage, achieved via the PersistentVolumeClaim (PVC) primitive. A Neo4j cluster containing 3 core servers would have the following PVCs: $ kubectl get ...

Read More »

Neo4j: Traversal query timeout

I’ve been spending some of my spare time over the last few weeks creating an application that generates running routes from Open Roads data – transformed and imported into Neo4j of course! I’ve created a user defined procedure which combines several shortest path queries, but I wanted to exit any of these shortest path searches if they were taking too ...

Read More »

Neo4j: Cypher – Deleting duplicate nodes

I had a problem on a graph I was working on recently where I’d managed to create duplicate nodes because I hadn’t applied any unique constraints. I wanted to remove the duplicates, and came across Jimmy Ruts’ excellent post which shows some ways to do this. Let’s first create a graph with some duplicate nodes to play with: UNWIND range(0, ...

Read More »

AWS: Spinning up a Neo4j instance with APOC installed

One of the first things I do after installing Neo4j is install the APOC library, but I find it’s a bit of a manual process when spinning up a server on AWS so I wanted to simplify it a bit. There’s already a Neo4j AMI which installs Neo4j 3.2.0 and my colleague Michael pointed out that we could download APOC ...

Read More »

Neo4j: How do null values even work?

Every now and then I find myself wanting to import a CSV file into Neo4j and I always get confused with how to handle the various null values that can lurk within. Let’s start with an example that doesn’t have a CSV file in sight. Consider the following list and my attempt to only return null values: WITH [null, "null", ...

Read More »

Neo4j: Graphing the ThoughtWorks Technology Radar

For a bit of Christmas holiday fun I thought it’d be cool to create a graph of the different blips on the ThoughtWorks Technology Radar and how the recommendations have changed over time. I wrote a script to extract each blip (e.g. .NET Core) and the recommendation made in each radar that it appeared in. I ended up with a ...

Read More »