Date: Fri, 29 Mar 2024 08:00:55 +0100 (CET) Message-ID: <564237336.127.1711695655978@vmisdata19.uni-oldenburg.de> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_126_1179867972.1711695655977" ------=_Part_126_1179867972.1711695655977 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
You can access the installed queries of the server with the quer= ies endpoint. If e.g. the would be a query with id 0, you could access the = query with: http://localhost:8888/queries/0
The result will look similar to the following:
The important part for accessing the results can be found in the websock= ets section. For each root operator (i.e. the sink of a plan) you could fin= d information how to access the results via a web socket connection.
Different kinds of data can be access. E.g. in der example above, the en= dpoint "/queries/5/d= 05c2648-2605-46be-a2e1-a88f5538aad3/0/CSV/ijqi2jrd9m0i170540h0dv0lss= " will delivers the results of the query via the CSV protocol handler. (Binary wi= ll be the Odysseus = Protocol Handler)
You can access the result e.g. in a browser with java script. (see https://githu= b.com/wso2/msf4j/blob/master/samples/websocket/chatApp/js-client/index.html= for an example)
Attention: In JSON the result contains the metadata appended aft= er JSON-Document with an ";" as separator.
You could also use this output as an input to another odysseus operator = as in the following
#PARSER= PQL #RUNQUERY in =3D ACCESS({ =09transport =3D 'WebsocketClient',=09 =09wrapper =3D 'GenericPush', =09datahandler =3D 'Tuple', =09protocol =3D 'CSV', =09source =3D 'access', =09readMetadata =3D 'true', =09options =3D [ =09=09['uri','ws://localhost:8888/queries/5/d05c2648-2605-46be-a2e1-a88f553= 8aad3/0/CSV/ijqi2jrd9m0i170540h0dv0lss'] =09], =09schema =3D [ =09=09['person','id', 'INTEGER'], =09=09['person','name', 'STRING'], =09=09['person','mail', 'STRING'] =09]=20 =09}=20 )
The same information can be found for all other operators in the queryOp= erators section.