Versions Compared

Key

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

from <stream-name>
insert into <stream-name> ( {<attribute-name>}| ‘*’|)

...

Pass-through query creates an output stream according to the projection defined and inserts any events from the input stream to the output stream.

...

Stream  defined by "define stream StockExchangeStream (symbol string, price int, volume float );" is used in below queries.

...

All

...

From all events of the StockExchangeStream stream, output all the events where the output event will have all the input event's attributes.

...

from StockExchangeStream
insert into StockQuote * ;

...

from StockExchangeStream
insert into StockQuote ;

...

Here since projection is omitted or ‘*’ is used, we are projecting all the input attributes as the output of the query, and hence the output stream ‘StockQuote’ will only contain ‘symbol’, 'price' and ‘volume’ attributes,  

 Selected attributes

From all events of the StockExchangeStream stream, output all the events where the output event will only have symbol and volume as its attributes.

from StockExchangeStream
insert into StockQuote symbol, volume 

Here we are only projecting ‘symbol’ and ‘volume’ as the output of the query, and hence the output stream ‘StockQuote’ will only contain ‘symbol’ and ‘volume’ attributes.

From all events of the StockExchangeStream stream, output all the events where the output event will only have symbol renamed as companyName and volume as its attributes.
 

from StockExchangeStream
insert into StockQuote symbol as companyName, volume 

...