...
We will use the same setting as in Tutorial: Simple Query Processing. So you should follow steps 1-4.
...
Execute the script and show the output as table. After some time, you should see only auctions opened by the seller with the id 1
In this script you define a SELECT-Operator. In Procedural Query Language (PQL) each operator is identified by a name. Inside the operator there are two parts. The first part is the configuration inbetween "{" and "}". The seconds part is the source part, i.e. here the sources are listed that should deliver the input.
...
If you look at the query plan, you will see, the following
The filter step is done by the top most operator Select.
...
More complex predicates can be defined. See MEP: Functions and Operators for further information.
Project
...
After translating the following output will be displayed. You can see, that only the selected attributes are printed.
Although, the examples only contain one operator, the operators can be connected. E.g. first a selection and than a projection:
Code Block |
---|
selected = SELECT({predicate='seller=1 || seller=2'}, nexmark:auction)
out = PROJECT({ATTRIBUTES=['id', 'initialbid', 'seller']},selected) |
Map
PROJECT only allow the selection of attributes. With the MAP-Operator calculations can be done on the input. The simpliest calculation is the output of an input attribute, so Map is more general than Project. (Warning: You should not use Map instead of Project, because it requires more processing capabilties).
...
Code Block |
---|
out = MAP({EXPRESSIONS=['id',['id+id','DoubleId'],['dolToEur(initialbid)','Bid €']]},nexmark:auction) |
...