Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-13-2019 01:12 AM
I work as a product manager within competance sharing and enhancement in the public sector. I live in Drammen in Norway. As part of my work, I have worked extensively with SQL databases (mostly MySQL/MariaDB and PostgreSQL), both as a database administrator and in the enhancement and development of database applications. This lead me to BI and analytics, and different kinds of solutions in that space (Pentaho, QlikView etc). However, while very good in their space, I found them a bit... restrictive. When the NoSQL or schemeless space opened up, I was curious and looked at different graph technologies, and found Neo4j with its Cypher query language to be a relatively easy, flexible and interesting approach. I then read some of the books, papers, and tutorials, and now have my own server online for experiments. However, I have not put Neo4j into any production situations yet.
One of the reasons for this is that most of the data I need to work come from JSON formatted endpoints online, and till recently this was a bit more difficult to get directly into Neo4j than CSV formatted data. Turns out one of the my important sources, Statistics Norway, data.ssb.no , uses JSON-Stat - https://json-stat.org/, which is a nested JSON format for statistical data. While I can unwind the data, it is quite fiddly to do so, so if anyone has a tutorial or have worked with Neo4j and JSON-stat, please let me know. 🙂 One of the tables I need to consult from SSB is https://www.ssb.no/statbank/table/07459/tableViewLayout1/ to get the number of people in each municipality in Norway, I only need the name and the number. At the bottom of the table is a link to endpoint and JSON query, https://data.ssb.no/api/v0/no/table/07459/ , and this is then JSON-stat formatted and needs to be unwinded in Neo4j.
So this is where I am at. 🙂
Best wishes,
Haakon
09-11-2019 01:46 PM
Hi Haakon!
This is interesting. @jennifer.reif do you know if we have any resources for this type of problem?
09-16-2019 09:47 AM
Have you looked at something like our APOC library? It usually handles retrieving and formatting data really nicely from JSON. You can see some examples in the document I've linked below. I don't know of anything specific to Neo4j/JSON-Stat, but hopefully this might help. Let me know if you have any questions!
Doc: https://neo4j.com/docs/labs/apoc/current/import/load-json/
Example: https://dzone.com/articles/effective-bulk-data-import-into-neo4j-part-1
Blog post: https://markhneedham.com/blog/2015/07/23/neo4j-loading-json-documents-with-cypher/
Cheers,
Jennifer
11-04-2019 04:58 AM
Thank you for the resources, Jennifer. I have looked these before, and have used APOC with other endpoints, and the solution is probably there, it is just that I find JSON-stat a bit fiddly to wrap my head around. I will give it another try once I find some spare time under the rug.
All the sessions of the conference are now available online