Bringing a CSV into Neo4j is quick and painless with GraphXR. Import, model, and save your data without writing a single query.
Get started with GraphXR today at https://graphxr.kineviz.com
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Data injection to Neo4j with GraphXR: Quick, easy, and code-free
1. Data injection to Neo4j with GraphXR:
Quick, easy, and code-free
delve deeper
2. Populating a new Neo4j database using GraphXR is quick, easy, and code free. Start by downloading and
installing Neo4j desktop from https://neo4j.com/download/.
11. You’re all set up! Now we’re ready to begin the visual ETL (Extract, Transform, Load) process. Click “Start”
12. You’ll notice you have 0 nodes and 0 relationships. Let’s change that. Click the GraphXR Graph App
13. If you already have a GraphXR login, enter it now. Otherwise, click “Sign Up” or visit
https://graphxr.kineviz.com to create your GraphXR account.
14. Once you’re signed in, you’ll find yourself in an empty workspace. Let’s populate it.
15. We’ll use this spreadsheet of Game of Thrones characters, available at
https://kineviz.com/s/GoT_characters.csv. Thanks to Jeffrey Lancaster for compiling this data.
16. Now drag and drop the CSV into your GraphXR workspace.
17. Each row becomes a node. Because each row contains an image link, that image shows up as the profile
image. Let’s turn those off for now.
18. Auto Show Image enables you to use an image link as an icon. Go to your “Project” panel=>”Settings” tab
and disable “Auto Show Image.”
19. Now we can start to model the graph. Go to the “Project” panel=>”Property” tab and select “houseName”
20. If you click the “Property” tab in the legend, you’ll see each character’s node has been colored according
to their house affiliation (or left gray for none).
21. Let’s create a node for each house. Go to the “Connector” Panel=>”Extract” tab.
22. We only have one data type, so “Source Label” is fine as is. Set “New Node” and “New Rel” to “House”
and “character_belongs_to_house” respectively. Select “houseName” from the “Props” dropdown.
I preper a convention of Capital first
character for Label, camel case for
property, and link words with “_” for
relationship. So in this case:
Label: House
Property: killedBy
Relationship: belongs_to
Actually relationship should be as
complete as possible, so we should
use: character_belongs_to_house
23. Click add and check the “Is Key” box. This ensures that only one node will be created for each house,
rather than a separate house node for every character.
24. Click “Run” to generate your House nodes. Note that if you have any nodes selected, the Extract operation
will only be applied to them. Leave nothing selected to act on all nodes within a label.
25. Now each character is connected to a node representing their house. Next let’s create a new relationship
from the “killedBy” property. Go to the “Connector” panel=>”Link” tab.
26. Set both Source and Target Label to “csvImport.” Set “characterName” as the Source Prop and “killedBy”
as the Target Prop. Enter “character_killed_by_character” for the New Relationship name.
28. Let’s go back to the “Project” panel=>”Settings” tab to turn portraits back on and verify our results. It looks
like we have everything modeled correctly.
29. Let’s save this graph back to Neo4j (Important! Only do this with an empty database, merging to an
existing DB is coming soon). Go to the “Project” panel=>”Data” tab and click “Save to Neo4j.”
30. A dialog box will appear. Since we launched GraphXR from Neo4j desktop, the correct values will already
be filled in. Click “Save to Neo4j.” Once you see “Save Successful” you can close GraphXR.
31. Wait, why does our database still show up with 0 nodes and 0 relationships?!
32. Click “Stop” and the information will refresh. Our visual ETL was a success! Congratulations on populating
your Neo4j database.