...
Description
Parameter
Example
...
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | Join Operator |
---|
linenumbers | true |
---|
|
output = join({predicate = RelationalPredicate('auction_id = auction')}, |
...
...
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Map Operator |
---|
linenumbers | true |
---|
|
SELECT * FROM left, right WHERE auction_id = auction |
LEFTJOIN
Description
Parameter
...
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 |
...
attributes:
A list of attribute names to project on
Example
PQL
Code Block |
---|
theme | Eclipse |
---|
language | javascript |
---|
title | 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 |
...
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)
|
CQL
Code Block |
---|
theme | Eclipse |
---|
language | sql |
---|
title | Rename Operator |
---|
linenumbers | true |
---|
|
SELECT auction_id AS auction, bidder_id AS bidder FROM input |
...
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 |
...
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',
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 ( 'host' 'example.com', 'port' '8081', 'read', '10240', 'write', '10240' )
STREAM TO sink SELECT * FROM input |
...
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 |
...