Dissection of Hello World in Operon

Hello World is a classic first application that is written when learning new language. Here's the Hello World in Operon:

To run this, we need to have Java installed and either run this with operon.jar or with Operon Server. First thing to note is that we don't need any other installations to run this, so running Operon queries as as simple as writing the query then just running it.

Let's go through this line by line:

  1. As we can see, the query starts with the word "From". From is a keyword in Operon, and it tells from where we are going to get the data. Please note that the keywords in Operon start with the capital letters, so From has big F in it.

    After From comes the input-source, which first in our examples is most of the time "json". You might be familiar with JSON already, but if you are not, then don't worry, you will learn it fast by going through the examples. Here we say that the input is a JSON-string, which has the value "Hello world!".

  2. Each query must also have the Select-statement. Here we have this dollar-symbol ($) after our Select-keyword. It means that we want to select root value, which means the value that was assigned by our input-source, and in this case it is a JSON-string "Hello world!".

  3. Finally we have the line which starts with hashtag-symbol, followed by the greater-than -symbol. Everything followed by the hashtag-symbol means that it is a comment. This is how we denote the query's output while going through examples.