Skip to content

Instantly share code, notes, and snippets.

@chanakaudaya
Created December 16, 2020 07:51
Show Gist options
  • Save chanakaudaya/d442bd30fdc9a9908a8a23eeb041f129 to your computer and use it in GitHub Desktop.
Save chanakaudaya/d442bd30fdc9a9908a8a23eeb041f129 to your computer and use it in GitHub Desktop.
@App:name('TailLine')
@App:description('Tails a file line by line and does a simple transformation.')
@source(type='file', mode='LINE',
file.uri='file:/Users/chanaka/my-experiments/wso2-si-samples/productions.csv',
tailing='true',
@map(type='csv'))
define stream SweetProductionStream (name string, amount double);
@sink(type = 'log')
define stream LogStream (name string, amount double);
from SweetProductionStream
select str:upper(name) as name, amount
insert into LogStream;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment