...
With you get to the IDE for this server.
The first step now, is to create a new project with the on the left lower side.
Name the project e.g. Nexmark
You will see
Now click on the "New File in current directory"
Name the file nexmark.qry
Now copy and paste the following script.
Remark: Because nexmark and this is Odysseus instance are inside a docker environment you cannot use localhost for nexmark queries → use "nexmark" instead.
| Code Block | ||
|---|---|---|
| ||
#PARSER PQL
#RUNQUERY
nexmark:person := ACCESS({source='nexmark:person',
wrapper='GenericPush',
transport='TCPClient',
protocol='SizeByteBuffer',
dataHandler='Tuple',
options=[
['host', 'nexmark'],
['port', '65440'],
['ByteOrder', 'LittleEndian']
],
schema=[
['timestamp', 'STARTTIMESTAMP'],
['id', 'INTEGER'],
['name', 'STRING'],
['email', 'STRING'],
['creditcard', 'STRING'],
['city', 'STRING'],
['state', 'STRING']
]
})
#RUNQUERY
nexmark:bid := ACCESS({source='nexmark:bid',
wrapper='GenericPush',
transport='TCPClient',
protocol='SizeByteBuffer',
dataHandler='Tuple',
options=[
['host', 'nexmark'],
['port', '65442'],
['ByteOrder', 'LittleEndian']
],
schema=[
['nexmark:bid','timestamp', 'STARTTIMESTAMP'],
['nexmark:bid','auction', 'INTEGER'],
['nexmark:bid','bidder', 'INTEGER'],
['nexmark:bid','datetime', 'LONG'],
['nexmark:bid','price', 'DOUBLE']
]
})
#RUNQUERY
nexmark:auction := ACCESS({source='nexmark:auction',
wrapper='GenericPush',
transport='TCPClient',
protocol='SizeByteBuffer',
dataHandler='Tuple',
options=[
['host', 'nexmark'],
['port', '65441'],
['ByteOrder', 'LittleEndian']
],
schema=[
['timestamp', 'STARTTIMESTAMP'],
['id', 'INTEGER'],
['itemname', 'STRING'],
['description', 'STRING'],
['initialbid', 'INTEGER'],
['reserve', 'INTEGER'],
['expires', 'LONG'],
['seller', 'INTEGER'],
['category', 'INTEGER']
]
})
#RUNQUERY
nexmark:category := ACCESS({source='nexmark:category',
wrapper='GenericPush',
transport='TCPClient',
protocol='SizeByteBuffer',
dataHandler='Tuple',
options=[
['host', 'nexmark'],
['port', '65443'],
['ByteOrder', 'LittleEndian']
],
schema=[
['id', 'INTEGER'],
['name', 'STRING'],
['description', 'STRING'],
['parentid', 'INTEGER']
]
}) |
And klick on "Run" in the lower right corner of the editor pane.
In the lower right corner, you should see the following:
You connect to a odysseus instance, you will need to use localhost, because the connection is done from the browser that is outside of docker!
If there are errors, they are not (yet) shown in this view. You will ne to navigate to
And you will see error messages.
Here everything went fine:
Now you can create another query, e.g. filtering all bids with a price higher than 200.
For this, you could use PQL (same as the source definition)
and press Run.
In the Queries windows you will see this query:
To see results, right click on the line and select "Show in table"
a new window opens at the upper right side and shows the results.
You can use this icon the show the query plan for this query (Remark. Does not work atm).
An alternative, is to click on the "Monitor" entry in the menu.
There you will see for any installed query, the plan. A click on the operators shows information at the bottom
Including output of each operator
For all registered connections, the sources, sinks and queries can be found under "Streams", "Sinks" and "Queries" resp.
The "Evaluation" entry can be used to evaluate query regarding runtime.
Remark: At the moment, this is browser based only, so for running a evaluation, the browser must be kept open.













