Create query in terminal window - syntax error

Using the developer edition I have successfully executed select statements in the terminal window.

Now following module 4 in Tigergraph Certification: GSQL 101 - TigerGraph I’m trying to create a query. It looked like he just copied text from a readonly terminal window and paste it into a normal window for execution:

CREATE QUERY aSimpleTestQuery(String someWord) FOR GRAPH MyGraph{

PRINT someWord;

}

So I wrote this text in notepad and pasted it into the terminal window but still got syntax errors. I thought that might be from the carriage returns so I removed them and paste in this text:

CREATE QUERY aSimpleTestQuery(String someWord) FOR GRAPH MyGraph{ PRINT someWord; }

And still got errors. What am I doing wrong?

Thanks.

Hi George,

The error message is for your extra “}” at the start of the line, as pointed out by Encountered " “}” "} “” at line 1, column 1.

Thanks,

Kevin

Thanks Kevin,

That may have been a copy error. this is a more common error that I get. you can see the test before and after:

and after

George,

You don’t need to write print STRING someword. I’m not sure if there’s any programming language that does this - just typing print someWord should suffice.

Thanks,

Kevin

OK that was a stupid mistake. But not all of my attempts included that. here’s a previous attempt.

code copied from notepad

and the result. Note - there was no extra curly bracket above.

This looks like the same copy error from the first post…?

Maybe try not copy-pasting it.

Kevin