This is an old revision of the document!
Table of Contents
Quick Graph
Python Py2Neo
Creating Nodes and Relationships The Graph class from Py2Neo is used to access the database given the password as a parameter. From an object from Graph class, we can begin a new transaction and create nodes and relationships, recording these actions in the database at once.
Importing CSV Data into Neo4j
Nicole White
From: https://www.youtube.com/watch?v=Eh_79goBRUk
Using LOAD CSV in the Real World | Nicole White, Data Scientist from Neo4j 39,768 views•Mar 26, 2015
Neo4j 21.9K subscribers Nicole White, Data Scientist for Neo4j, demonstrates the process of downloading a raw .csv file from the Internet and importing it into Neo4j. This process includes cleaning the .csv file, visualizing a data model, and writing the Cypher query that will import the data. This presentation is meant to
From: https://neo4j.com/developer/guide-import-csv/
Tools There are a number of tools that help you check and validate your CSV data files. Webinar “LOAD CSV in the Real World” Goov video CSVKit CSVKit is a set of Python tools that provide statistics (csvstat), search (csvgrep), … and more for your CSV files. Especially csvstat is very helpful to get an overview and statistic over your file, if you know your domain and data you can immediately spot inaccuracies. Field length is important as excess field length indicates stray quotes.
neo4j load csv null values
From: https://stackoverflow.com/questions/46907116/import-a-csv-file-with-null-values-in-neo4j
CREATE (m:Employee {name: toUpper(row.Lastname), firstname: toUpper(row.Name)}) FOREACH (n IN (CASE WHEN row.Room IS NULL THEN [] ELSE [1] END) | MERGE (r:Room { name:row.Room}) CREATE (m)-[:WORKS_IN]->(r) ) FOREACH (n IN (CASE WHEN row.Team IS NULL THEN [] ELSE [1] END) | MERGE (t:Team {name:row.Team}) CREATE (m)-[:WORKS_WITH]->(t) )
Neo4j CSV file load with empty cells
From: https://stackoverflow.com/questions/43235307/neo4j-csv-file-load-with-empty-cells
LOAD CSV WITH HEADERS FROM 'file:///fileName.csv' AS line MERGE (Test_Document:A {name: line.name}) WITH line, Test_Document FOREACH (x IN CASE WHEN line.property IS NULL THEN [] ELSE [1] END | MERGE (Properties:B {property1: line.property}) MERGE (Test_Document)-[:property1]->(Properties) ) LOAD CSV WITH HEADERS FROM 'file:///fileName.csv' AS line WITH line, line.name AS Name, line.property AS Property MERGE (Test_Document:A {name: Name}) WITH Property WHERE Property <> "" MERGE (Properties:B {property1: Property}) MERGE (Test_Document)-[:property1]->(Properties)
How do I enable remote HTTPS access with Neo4j 3.0.x
From: https://neo4j.com/developer/kb/how-do-i-enable-remote-https-access-with-neo4j-30x/
The change from localhost:7473 to 0.0.0.0:7473 will allow for remote connections to https://<Neo4j_Host_IP>:7473
From: https://neo4j.com/docs/operations-manual/current/configuration/connectors/
Connector name Protocol Default port number dbms.connector.bolt Bolt 7687 dbms.connector.http HTTP 7474 dbms.connector.https HTTPS 7473
Install Neo4j on SUSE
From: https://neo4j.com/docs/operations-manual/current/installation/linux/rpm/
2.2.2.2. SUSE SUSE is not certified for production use. These instructions are provided for convenience for those wishing to use Neo4j in non-production environments. For SUSE-based distributions the steps are as follows: Use the following as root to add the repository: zypper addrepo --refresh http://yum.neo4j.org/stable neo4j-repository Install Neo4j. To install Neo4j Community Edition as root: zypper install neo4j-3.4.0 To install Neo4j Enterprise Edition as root: zypper install neo4j-enterprise-3.4.0