Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Creating multiple nodes with mutating Cypher
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Klishin  
View profile  
 More options May 4 2012, 3:53 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Fri, 4 May 2012 23:53:42 +0400
Local: Fri, May 4 2012 3:53 pm
Subject: Creating multiple nodes with mutating Cypher
I am trying to create multiple nodes with mutating Cypher. Neo4J isn't happy with my queries and returns 400s.

Some variations on my query that I have tried:

foreach(n in {xs} : CREATE {n})
foreach(n in {xs} : CREATE a = {n} RETURN n)

where xs is a list of maps. Is what I am trying to do possible with mutating Cypher?

The exception trace in the server log says

«string matching regex `(?i)\\bstart\\b' expected but `f' found\nUnfortunately, you have run into a syntax error that we don't have a nice message for.\nBy sending the query that produced this error to cyp...@neo4j.org, you'll save the\npuppies and get better error messages in our next release.»

I am more interested in learning if what I am doing is possible than saving puppies so I decided to ask here.

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options May 4 2012, 3:56 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Fri, 4 May 2012 21:56:43 +0200
Local: Fri, May 4 2012 3:56 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
Michael,

that functionality just made it into cypher the other day.

create n={p}
// where p is an iterable (array, collection) of maps.

So if you have the latest 1.8-SNAPSHOT you should be able to do it.
see http://docs.neo4j.org/chunked/snapshot/query-create.html#create-creat...

Cheers

Michael

Am 04.05.2012 um 21:53 schrieb Michael Klishin:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 4 2012, 4:02 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Sat, 5 May 2012 00:02:39 +0400
Local: Fri, May 4 2012 4:02 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
Michael Hunger:

> create n={p}
> // where p is an iterable (array, collection) of maps.

> So if you have the latest 1.8-SNAPSHOT you should be able to do it.

Yes, I am able to create individual nodes with 1.8 M01 and was wondering about doing it for iterables.

Trying the line you've provided above, I get

«org.neo4j.cypher.CypherTypeException: Don't know how to extract parameters from this type: java.util.ArrayList»

back at

org.neo4j.cypher.internal.mutation.GraphElementPropertyFunctions$class.getM apFromExpression(UpdateAction.scala:85)

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 4 2012, 4:03 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Sat, 5 May 2012 00:03:28 +0400
Local: Fri, May 4 2012 4:03 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
Michael Hunger:

> if you have the latest 1.8-SNAPSHOT you should be able to do it.

I am using 1.8-M01. Should I be using snapshots?

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options May 4 2012, 4:07 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Fri, 4 May 2012 22:07:53 +0200
Local: Fri, May 4 2012 4:07 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
This functionality is not in M01 it just made it in yesterday, so if you need this, yes or you have to wait for M02.

Michael

Am 04.05.2012 um 22:03 schrieb Michael Klishin:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 4 2012, 4:24 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Sat, 5 May 2012 00:24:55 +0400
Local: Fri, May 4 2012 4:24 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
Michael Hunger:

> So if you have the latest 1.8-SNAPSHOT you should be able to do it.
> see http://docs.neo4j.org/chunked/snapshot/query-create.html#create-creat...

I can confirm that it works with the snapshot version. Very nice!

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andres Taylor  
View profile  
 More options May 4 2012, 4:25 pm
From: Andres Taylor <andres.tay...@neotechnology.com>
Date: Fri, 4 May 2012 22:25:32 +0200
Local: Fri, May 4 2012 4:25 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher

On Fri, May 4, 2012 at 10:12 PM, Michael Klishin <

michael.s.klis...@gmail.com> wrote:
> Michael Hunger:

> > This functionality is not in M01 it just made it in yesterday, so if you
> need this, yes or you have to wait for M02.

> I see. neo4j.org downloads page suggests the most recent snapshot is from
> April. Is this true? should I build from
> source then?

That's weird. We push out snapshot from our CI build. I just checked
downloaded the Unix version, and it contains binaries produced a few hours
ago.

We'll check why the date on the page is wrong...

Andrés


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Klishin  
View profile  
 More options May 4 2012, 4:12 pm
From: Michael Klishin <michael.s.klis...@gmail.com>
Date: Sat, 5 May 2012 00:12:19 +0400
Local: Fri, May 4 2012 4:12 pm
Subject: Re: [Neo4j] Creating multiple nodes with mutating Cypher
Michael Hunger:

> This functionality is not in M01 it just made it in yesterday, so if you need this, yes or you have to wait for M02.

I see. neo4j.org downloads page suggests the most recent snapshot is from April. Is this true? should I build from
source then?

https://skitch.com/michaelklishin/82y93/neo4j-worlds-leading-graph-da...

MK


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »