Thanks Michael this works fine and much more efficiently.
I wonder why should I use WHERE time > t.time . Given that the date are
in ascending order i think that just SET t.time = time is enough. Am I
right?
Sotiris
On 06/20/2014 09:35 PM, Michael Hunger wrote:
you could update to 2.1.2 and use load-csv
it would be good if you could reformat your date to be comparable
strings, e.g. 2014-06-18
load csv with headers from "url" as line
MERGE (u:Url {url:line.url})
MERGE (t:Tag {tag:line.tag})
MERGE (u)-[t:TAGGED]->(t)
WITH t, split(l.time,"/") as parts
WITH t, parts[2]+"-"+parts[1]+"-"+parts[0] as time
WHERE time > t.time
SET t.time = time
Michael
Am 19.06.2014 um 13:41 schrieb Sotiris Beis <[email protected]
<mailto:[email protected]>>:
Hi,
I have want to create a bipartite graph with Neo4j. My dataset is an
edge list with the following entities, URL TAG TIMESTAMP.
e.g.
http://www.neo4j.org/ graph-database 18/06/2014
http://www.mongodb.org/ object-database 18/06/2014
http://www.neo4j.org/ graph-database 19/06/2014
I want to avoid duplicate nodes and edges. Moreover I want to store
the latest timestamp of an edge. So every time a edge comes again I
need to update the timestamp property. Currently I use this code
https://gist.github.com/sarovios/b11b61b09f7a42d33625 to create my
graph. I wonder if there is a more efficient way.
I use neo4j-community-2.03
Any suggestion would be helpful.
Sotirs
--
You received this message because you are subscribed to the Google
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "Neo4j" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/neo4j/0oJdQ2qsjtE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.