Content Deep Dive
How to Export CSV from Neo4j with Curl, Cypher and JQ
Blog post from Neo4j
Post Details
Company
Date Published
Author
Michael Hunger
Word Count
533
Language
English
Hacker News Points
-
Summary
The author explores using the `jq` command-line JSON processor to export Cypher query results from Neo4j to a CSV file. They start by executing a Cypher statement against the transactional HTTP-API endpoint, which returns the connections between people in the Pokec social network dataset. The author then uses `curl` to send the query and receive the response as JSON. Next, they use `jq` to transform the JSON into CSV format, selecting specific fields and converting them to CSV using various transformers. Finally, they test their approach by extracting data from Neo4j at high speed, transferring 1 GB of data in just 3 minutes with an average transfer rate of 6.2 MB/s.