Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-11-2021 11:06 AM
I am having an issue running a query (that works in my dev environment but doesn't seem to in my production environment) and I have simplified it to the following for example:
UNWIND $batch as row
MATCH (leg:Leg {SYS_I: row.props.SYS_I})
RETURN leg
Here is a simplified example of my $batch
parameter (Note, there are more things in props, hence why its nested, I just removed them for readability):
:params batch => "[{'props': {'SYS_I': 1919176.0}, 'from': '137', 'to': '137'}, {'props': {'SYS_I': 1923475.0}, 'from': '111', 'to': '111'}]"
I receive the following Neo Client Syntax Error
Type mismatch: expected Map, Node, Relationship, Point, Duration, Date, Time, LocalTime, LocalDateTime or DateTime but was String (line 2, column 24 (offset: 44))
"MATCH (leg:Leg {SYS_I: row.props.SYS_I})" ^
Prod Version: 4.2.3 Community
Dev Version: 4.2.4 Community
I appreciate any help!
Solved! Go to Solution.
05-15-2021 02:00 PM
Hello @Keith.gamble
There is a difference between:
:params batch => "[{'props': {'SYS_I': 1919176.0}, 'from': '137', 'to': '137'}, {'props': {'SYS_I': 1923475.0}, 'from': '111', 'to': '111'}]"
And
:params batch => [{'props': {'SYS_I': 1919176.0}, 'from': '137', 'to': '137'}, {'props': {'SYS_I': 1923475.0}, 'from': '111', 'to': '111'}]
The first is a string while the second is a list, the second should work
Regards,
Cobra
05-15-2021 02:00 PM
Hello @Keith.gamble
There is a difference between:
:params batch => "[{'props': {'SYS_I': 1919176.0}, 'from': '137', 'to': '137'}, {'props': {'SYS_I': 1923475.0}, 'from': '111', 'to': '111'}]"
And
:params batch => [{'props': {'SYS_I': 1919176.0}, 'from': '137', 'to': '137'}, {'props': {'SYS_I': 1923475.0}, 'from': '111', 'to': '111'}]
The first is a string while the second is a list, the second should work
Regards,
Cobra
All the sessions of the conference are now available online