Versions Compared

Key

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

...

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).

Create a new Odysseus Script file with the PQL template and name it query4.

Code Block
out = MAP({EXPRESSIONS=['id','id+id','dolToEur(initialbid)']},nexmark:auction)

Image Added

As you can see, the output is the printed expression. Sometimes (especially when the output should be processed by another operator) this names should be more handy. You could use the RENAME Operator or an additional feature of Map. Instead of giving an expression, there can be a pair of expression and output name.

Code Block
out = MAP({EXPRESSIONS=['id',['id+id','DoubleId'],['dolToEur(initialbid)','Bid €']]},nexmark:auction)

 

Image Added