Choosing the right tool to import your data mainly depends on its format. Here are some overall recommendations:
- If you only have JSON files, then apoc.load.json is your only option.
- If you are using CSV files, then:
- If your data is big, use the import tool from the command line.
- If your data is small or medium-sized, you can use APOC or Cypher, LOAD CSV.
This closes our section about data imports, where we learned how to feed a Neo4j graph with existing data, from CSV, JSON, or even via a direct call to a web API. We will use those tools all through this book to have meaningful data to run the algorithms on.
Before moving on to those algorithms, a final step is needed. Indeed, as with SQL, there are often several Cypher queries producing the same result, but not all of them have the same efficiency. The next section will show you how to measure efficiency and deal with some good practices to avoid the main caveats.