...
expressions:
A list of expressions to map multiple incoming attribute values to out-coming attributes
Example
...
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Map Operator |
---|
linenumbers | true |
---|
|
output = MAP({
expressions = ['auction_id * 5','sqrt(auction_id)']
}, input) |
...
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Map Operator |
---|
linenumbers | true |
---|
|
SELECT auction_id * 5, sqrt(auction_id) FROM input |
SASE
Description
Dieser Operator ermöglicht es, Anfragen mit zeitlichen Mustern zu definieren. Zu diesem Zweck wird die SASE+ Anfragesprache verwendet und die Anfrage im Parameter query übergeben. Die angebenen Quellen müssen den passenden Typ haben (für das folgende Beispiel also s05 und s08), die Reihenfolge ist egal. Ggf. muss der Typ einer Quelle vorher noch mit Hilfe der Rename-Operation definiert werden. Der Parameter heartbeatrate legt fest, wie oft ein Hearbeat generiert werden soll, wenn ein Element verarbeitet wurde, welches aber nicht zu einem Ergebnis geführt hat.
...
attributes:
A list of attribute names to project on
Example
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Map Project Operator |
---|
linenumbers | true |
---|
|
output = PROJECT({
attributes = ['auction', 'bidder']
}, input) |
...
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Project Operator |
---|
linenumbers | true |
---|
|
SELECT auction, bidder FROM input |
PUNCTUATION
Description
Der Punctuation Operator erlaubt das Einfügen von Punctuation in den Verarbeitungsstrom um so nachfolgende Operatoren vor einem möglichen Buffer-Overflow zu schützen. Hierfür hat der Operator zwei Eingänge I1 und I2. Der Eingang I1 stellt den Dateneingang dar und leitet eingehende Tupel direkt an den Ausgang. Der zweite Eingang I2 dient als Frequenzgeber. Sobald die Differenz der Eingangstupel zwischen dem ersten Eingang I1 und dem zweiten Eingang I2 über einen bestimmten Schwellwert steigt, wird in den linken Strom an I1 eine Punctuation eingefügt und ältere Tupel die eventuell danach eintreffen verworfen.
Der Punctuation Operator kann dabei ein nicht deterministisches Verhalten erzeugen, weil das Einfügen von Punctuations von der aktuellen Systemlast abhängen kann und sollte nur verwendet werden, wenn eine normale Verarbeitung der Daten aufgrund ihrer schwankenden Frequenzen nicht möglich ist.
...
aliases
: The list new attribute names to use from now on. If the flag pairs
is set, aliases
will be interpreted as pairs of (old_name, new_name). See the examples below.type
: By default, each schema has the name of the source from which the data comes from (i.e. it is the name of the type that is processed by this operator). With this parameter the type (source) name can be changed. This is needed in the SASE operator. pairs:
Optional boolean value that flags, if the given list of aliases should be interpreted as pairs of (old_name, new_name). Default value is false.
Example
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Rename Operator |
---|
linenumbers | true |
---|
|
// Renames the first attribute to auction_id, the second to bidder_id and the last to another_id.
output = RENAME({
aliases = ['auction_id', 'bidder_id', 'another_id']
}, input)
// Due the set flag pairs, the rename operator renames the attribute auction_id to auction and bidder_id to bidder.
output = RENAME({
aliases = ['auction_id', 'auction', 'bidder_id', 'bidder'],
pairs = 'true'
}, input)
|
ROUTE
Description
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Rename Operator |
---|
linenumbers | true |
---|
|
SELECT auction_id AS auction, bidder_id AS bidder FROM input |
ROUTE
Description
This operator can be used to route the This operator can be used to route the elements in the stream to different further processing operators, depending on the predicate.
...
predicate:
The predicate to evaluate over each incoming tuple
Example
...
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Select Operator |
---|
linenumbers | true |
---|
|
output = SELECT({
predicate=RelationalPredicate('price > 100')
}, input) |
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Select Operator |
---|
linenumbers | true |
---|
|
SELECT * FROM input WHERE price > 100 |
Sender
Description
This operator can be used to publish processing results to multiple endpoints using different transport and application protocols.
...
wrapper:
In Odysseus the default wrappers are GenericPush and GenericPulltransport:
The transport defines the transport protocol to use.protocol:
The protocol parameter defines the application protocol to transform the processing results.
datahandler:
This parameter defines the transform of the single attributes of the processing results.options:
Transport protocol and application protocol depending options
Example
...
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Sender Operator |
---|
linenumbers | true |
---|
|
output = SENDER({sink='Sink',
wrapper='GenericPush',
transport='TCPClient',
protocol='CSV',
dataHandler='Tuple',='Tuple',
options=[['host', 'example.com'],['port', '8081'],['read', '10240'],['write', '10240']]
}, input) |
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Sender Operator |
---|
linenumbers | true |
---|
|
CREATE SINK sink (timestamp STARTTIMESTAMP, auction INTEGER, bidder INTEGER, datetime LONG, price DOUBLE)
WRAPPER 'GenericPush'
PROTOCOL 'CSV'
TRANSPORT 'TCPClient'
DATAHANDLER 'Tuple'
OPTIONS ( options=[['host', 'example.com'],[ 'port', '8081'],[ 'read', '10240'],[ 'write', '10240']]
}, input))
|
SINK
Description
Parameter
Example
...
This operator calculates the union of two input sets
Parameter
none
Example
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Union Operator |
---|
|
output = UNION(left, right) |
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Union Operator |
---|
linenumbers | true |
---|
|
SELECT * FROM left UNION SELECT * FROM rigtht |
UNNEST
Description
The UnNest operator unpacks incoming tuple with a multi value attribute to create multiple tuples
...
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | UnNest Operator |
---|
linenumbers | true |
---|
|
output = UNNEST({
attribute='myAttribute'
},input) |
...
UDO
Description
The UDO operator calls a user defined operator.
...
class:
The name of the user defined operatorinit:
Additional parameter for the user defined operator
Example
...
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | UDO Operator |
---|
linenumbers | true |
---|
|
output = UDO({
class='MyUDO',
init='some parameter'
}, input) |
...
WINDOW
Description
Parameter
...