RUN QUERY : Passing params as json Object

Hi Team,

I am trying to run a parameterized query, by passing parameters as JSON object and it throws the error

Query -

CREATE QUERY greetPerson(INT age = 3, STRING name = “John”,
DATETIME birthday = to_datetime(“2019-02-19 19:19:19”))
{
PRINT age, name, birthday;
}

RUN QUERY greetPerson({“name”: “Emma”, “age”: 21})

Error -

Encountered " “{” "{ “” at line 1, column 23.
Was expecting:
“)” …

While in TigerGraph documentation also, same query is mentioned and it is said that the query should run without any errors.

Reference - https://docs.tigergraph.com/dev/gsql-ref/querying/query-operations#parameter-json-object

This feature has only been supported since 3.2.
https://docs.tigergraph.com/faqs/release-notes-tigergraph-3.2#general-improvements

2 Likes