Unable to run a query

19 views
Skip to first unread message

Paolo Di Pietro

unread,
Nov 13, 2018, 3:03:26 AM11/13/18
to Neo4j
Hi all,

I'm running the Neo4j Community 3.0.12 on docker.

First of all: there still is the old panel using to running queries instead of using the browser (speaking around v2.2)????

Second: I have some troubles running the following query:


    :param nome: "Di Pietro Chiara"       /* as suggested by Michael Hunger in an answer on a post

    merge (_cal_445:`calendario` { :`X-VR-CALNAME` = '$nome' })-[:`appartiene a`]->(_per_445:`persona`) 
    WHERE $nome = concat(_per_445.cognome," ",_per_445.nome) 
            OR $nome = concat(_per_445.nome," ",_per_445.cognome)
    return _cal_445, _per_445

well, I made some changes and some attempts to run the query, with no result.

    {
       "nome" : 'Di Pietro Chiara'
    }    

    Merge (_cal_445:`calendario` { :`X-VR-CALNAME` = '$nome' })-[:`appartiene a`]->(_per_445:`persona`) 
        WHERE $nome = concat(_per_445.cognome," ",_per_445.nome) 
            OR $nome = concat(_per_445.nome," ",_per_445.cognome)
    return _cal_445, _per_445

and in this case the error is as follow:

    Invalid input '{': expected <init> (line 1, column 1 (offset: 0))
    "{ "nome" : 'Di Pietro Chiara' }    "
     ^

Has someone an idea?

BTW, the :help param|params returns an error


Paolo Di Pietro

unread,
Nov 14, 2018, 9:41:26 PM11/14/18
to Neo4j

Michael Hunger

unread,
Nov 15, 2018, 7:43:05 AM11/15/18
to ne...@googlegroups.com
Why are you running such an old version?
Just upgrade to the most recent one.

Your query is broken in many places.

I think it's best if you take the cypher online training again to familiarize yourself with the syntax or look at the cypher refcard: https://neo4j.com/docs/cypher-refcard/current
Also it seems your generating queries with variable names changing all the time. That's not recommended, b/c then the cypher compiler cache cannot work.

Parameter handling and query execution is separate in Neo4j browser.
You have to set parameters first.
And only after just run the query.

:help params

:help cypher

--
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 neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paolo Di Pietro

unread,
Nov 15, 2018, 6:58:01 PM11/15/18
to ne...@googlegroups.com
Hi Michael,

I’m running such an old version because I restarted a new project, using my old knowledge!

Using the 3.0.12, some  links to the documentation are broken.

Also, some helpers, like :help params doesn’t run.

Three years ago I developed a front end using Ruby on Rails, with bootstrap: not so smart.

Today, I need to build a new front-end for an application: which is the best set of tools you suggest to use for this job?  Should be fast to learn and implement, and visually appeal!

TIA

Paolo

Inviato da iPad
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/ThAWsemffB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

Paolo Di Pietro

unread,
Nov 15, 2018, 7:16:04 PM11/15/18
to ne...@googlegroups.com
Michael,

Can you please try to rewrite for me the query using all the up to date tricks and syntax?

Every nMe was different, because in the older versions qit returned a ‘variable already used ‘ error!

I have thousands of excel tables to load, and the direct CSV import doesn’t provide me with a good system to control all the data , put them in relation, and create new node types and new relationships.

Any suggestion is welcome, as always!!!

Ciao

Paolo

Inviato da iPad

Il giorno 15 nov 2018, alle ore 13:42, 'Michael Hunger' via Neo4j <ne...@googlegroups.com> ha scritto:

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/ThAWsemffB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

Michael Hunger

unread,
Nov 15, 2018, 8:24:48 PM11/15/18
to ne...@googlegroups.com
Can you please move your questions to community.neo4j.com easier to answer there.
Thank you

Bootstrap and ruby should still work.
Otherwise, check out React with Material UI and grandstack.io

Michael
Reply all
Reply to author
Forward
0 new messages