Created
June 1, 2018 09:23
-
-
Save chanakaudaya/7c784034b02c030fd689509ccf2e89ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@App:name("ReceiveAndCount") | |
@App:description('Receive events via HTTP transport and view the output on the console') | |
@Source(type = 'http', | |
receiver.url='http://localhost:8006/productionStream', | |
basic.auth.enabled='false', | |
@map(type='json')) | |
define stream SweetProductionStream (name string, amount double); | |
@sink(type='log') | |
define stream TotalCountStream (totalCount long); | |
-- Count the incoming events | |
@info(name='query1') | |
from SweetProductionStream | |
select count() as totalCount | |
insert into TotalCountStream; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment