Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • expressions: A list of expressions to map multiple incoming attribute values to out-coming attributes

Example

...

PQL
Code Block
themeEclipse
languagejavascript
titleMap Operator
linenumberstrue
output = MAP({
              expressions = ['auction_id * 5','sqrt(auction_id)']
             }, input)

...

CQL
Code Block
themeEclipse
languagesql
titleMap Operator
linenumberstrue
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 (warning) 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
themeEclipse
languagejavascript
titleMap Project Operator
linenumberstrue
output = PROJECT({
                  attributes = ['auction', 'bidder']
                 }, input)

...

CQL
Code Block
themeEclipse
languagesql
titleProject Operator
linenumberstrue
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
themeEclipse
languagejavascript
titleRename Operator
linenumberstrue
// 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
themeEclipse
languagesql
titleRename Operator
linenumberstrue
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
themeEclipse
languagejavascript
titleSelect Operator
linenumberstrue
output = SELECT({ 
                 predicate=RelationalPredicate('price > 100') 
                }, input)
CQL
Code Block
themeEclipse
languagesql
titleSelect Operator
linenumberstrue
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 GenericPull
  • transport: 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
themeEclipse
languagejavascript
titleSender Operator
linenumberstrue
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
themeEclipse
languagesql
titleSender Operator
linenumberstrue
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
themeEclipse
languagejavascript
titleUnion Operator
output = UNION(left, right)
CQL
Code Block
themeEclipse
languagesql
titleUnion Operator
linenumberstrue
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
themeEclipse
languagejavascript
titleUnNest Operator
linenumberstrue
output = UNNEST({
                 attribute='myAttribute'
                },input)

...

UDO

Description

The UDO operator calls a user defined operator.

...

  • class: The name of the user defined operator
  • init: Additional parameter for the user defined operator

Example

...

Code Block
themeEclipse
languagejavascript
titleUDO Operator
linenumberstrue
output = UDO({
              class='MyUDO', 
              init='some parameter'
             }, input)

...

WINDOW

Description

Parameter

...