cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Can I do this in Neo4j?

Dear Neo4j Community,
I'm just getting started on Neo4j and I am having some issues in modelling and importing data.

This screenshot represents a random sample of possible causes of computer problems based on many factors. For the last two columns, they can be TRUE or FALSE in a certain condition where other columns come together in a certain order.

For example in the first row: If you hear a loud noise in a DELL device and you have average power and high voltage, then the fan could be the problem and in that instance, it's a common case but it doesn't need an immediate fix.

If one of these factors changed (Brand, Power or Voltage), then the last two columns could change as well. Any idea of how to model that without duplicating any nodes?

2X_7_7b29a04009b36921cd7c137228dbda8a82f22da2.png

One last thing, Is there any web application or dashboard where I can manage Neo4j database with certain accessibility like edit node content and relationships only?

3 REPLIES 3

I'd definitely start out by white-boarding your model and writing out the questions you're going to ask. Over the weekend if I remember to, I'll try to supply my opinion on how the model might look.

I'd start by writing your your nouns (nodes) and your verbs (relationships) and make sure you have your terminology correct, this will greatly help your modeling efforts. Here's some initial vocabulary that I'm seeing in your data:

Incident - bug ticket that maybe started this support case
Observation - node of anything that was observed
Hardware Component - CPU, Fan, Screen, etc...
Hardware Brand - Dell, HP, Apple, etc..
Setting - High, low, voltage
Outcome - immediate fix?

Then simple relationships to connect the nodes where appropriate. (issue)-[:has]->(outcome), (hardware compoent)-[is]->(hareware brand) etc....

The Common in your data can be subjective because depending on the number of incidents and needs a threshold to determine. What is common today may not be common tomorrow. You could make it a relationship that periodically you rebuild as you analyze your data to show trends in data.

The Common in your data can be subjective because depending on the number of incidents and needs a threshold to determine. What is common today may not be common tomorrow.

Thanks Mike for answering.

In fact, I almost finished the modeling but didn't find a way to import common/fix columns as there values are dependent on a specific case and they can change based on any other change in the previous columns. Any idea how to do that?

For example:in the first and sixth rows. All observations, issues, power, brand are the same. With the change in voltage, immediate fix value changed because of that. How can I build that relationship between (Immediate Fix Column) and (Issue Column) without duplicating the (Compute Fan Node). What do you think?

If the Immediate fix flag changes with the change in voltage, then add a column to store the voltage values and this will help you.

I took your row 1 and row 6 values and added a column, 'VoltageValue', and stored 220 for row 1 and 110 for row 2. I created a .csv file and imported. Here is my Cypher script:

LOAD CSV WITH HEADERS FROM "file:/nael.csv" As line
WITH line

MERGE (o:Observ {obsrv:line.Observation})
MERGE (i:Issue {issue:line.Issue})
MERGE (b:Brand {brand:line.Brand})
MERGE (c:Common {val:line.Common})
MERGE (p:Power {power:line.Power})
MERGE (v:Voltage {volt:line.Voltage})
MERGE (vv:Value {value: toInteger(line.VoltageValue)})
MERGE (f:Fix {value:line.ImmediateFix})

MERGE (o)-[:ISSUE]->(i)
MERGE (i)-[:BRAND]->(b)
MERGE (b)-[:COMMON]->(c)
MERGE (c)-[:POWER]->(p)
MERGE (p)-[:VOLTAGE]->(v)
MERGE (v)-[:VOLTVALUE]-(vv)
MERGE (vv)-[:IMMEDIATEFIX]-(f)
;

Result: