Hi @Waruna Yapa ,
Thanks for using Microsoft Q&A platform .
I see, the error is likely occurring because the query doesn't specify what should be projected after the graph-match
operation. To avoid the "missing project clause" error, you need to include a projection statement after the graph-match
operation.
Could you please specify where it's mentioned that projection is optional in the document you shared.
Kindly try the below code , this query should match all entries that match the pattern ()--[]--()
.
let employees = datatable(name:string, age:long)
[
"Alice", 32,
"Bob", 31,
"Eve", 27,
"Joe", 29,
"Chris", 45,
"Alex", 35,
"Ben", 23,
"Richard", 39,
];
let reports = datatable(employee:string, manager:string)
[
"Bob", "Alice",
"Chris", "Alice",
"Eve", "Bob",
"Ben", "Chris",
"Joe", "Alice",
"Richard", "Bob"
];
reports
| make-graph employee --> manager with employees on name
| graph-match (A)<-[]-(B)
project manager=A.name , emp=B.name
Hope it helps. Kindly accept the answer by clicking on `Accept answer button. Thankyou