i had load a data set in neo4j using cypher query. when i load the data i found some null in between the words.

how to clean the null values.

my aim is to find word count frequency.

LOAD CSV FROM "file:///tmp1.csv" AS line

FIELDTERMINATOR ' '

FOREACH (w IN RANGE(0, SIZE(line)-2) |

MERGE (lx:Kbank{word:coalesce(line[w],'NOT SET')})

ON CREATE SET lx.count = 1

ON MATCH SET lx.count = lx.count + 1

MERGE (mx:Kbank{word:coalesce(line[w+1],'NOT SET')})

ON CREATE SET mx.count = 1

ON MATCH SET mx.count = mx.count + (case when w = SIZE(line)-2 then 1 else 0 end)

MERGE (lx)-[r:next]->(mx)

ON CREATE SET r.count = 1

ON MATCH SET r.count = r.count +1)

RETURN line

limit 100

More Prashanth Kolaneru's questions See All
Similar questions and discussions