H kamal thanks, that works too. i guess the original problem was due to the
"call" statement being there .. removing that seems to work although i
thought i tested that already .. it also needed small rewrite to SET the
uuid property to avoid duplicate record conflicts

so for apoc functions no call stetement in front i guess

thanks

2017-11-29 20:30 GMT+01:00 Kamal Murthy <ameyas...@gmail.com>:

> Hi Koen,
>
> It is missing WITH line statement. Try this:
>
> USING PERIODIC COMMIT
> LOAD CSV WITH HEADERS
> FROM "file:///test.csv" AS line FIELDTERMINATOR ';'
> *WITH line, * *apoc.create.uuid()  as uid*
> MERGE (server:Server { name: line.'Machine Name`, uuid: *uid* })
>
> Or,
>
> USING PERIODIC COMMIT
> LOAD CSV WITH HEADERS
> FROM "file:///test.csv" AS line FIELDTERMINATOR ';'
> *WITH line*
> MERGE (server:Server { name: line.'Machine Name`, uuid:
> *apoc.create.uuid()* })
>
> I prefer the first one.
>
> -Kamal
>
> On Wednesday, November 29, 2017 at 10:45:42 AM UTC-8, koen wrote:
>>
>> Hi, when using the following simple cypher query with the apoc function
>> apoc.create.uuid()
>>
>> USING PERIODIC COMMIT
>> LOAD CSV WITH HEADERS
>> FROM "file:///test.csv" AS line FIELDTERMINATOR ';'
>> MERGE (server:Server { name: line.`Machine Name`, uuid: call
>> apoc.create.uuid() })
>>
>> I keep getting an error message like
>>
>> Invalid input 'p': expected 'n/N' (line 4, column 63 (offset: 158))
>> "MERGE (server:Server { name: line.`Machine Name`, uuid: call 
>> apoc.create.uuid() })"
>>
>>
>> I am running latest version of desktop, all procedures and functions are
>> active and show in the browser (when running the list procedutes /
>> functions command) and without the   -- uuid: call apoc.create.uuid() --
>> part the query works fine
>>
>> Do i have to do / configure something so that i can use apoc functions in
>> queries ? Or is the query syntax not ok ?
>>
>> Thanks Koen
>>
>>
>>
>> --
> 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/3OedUQ8P2i0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Groeten / Best Regards,

Koen

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

Reply via email to