What product/components do you use and which version/fix level are you on?
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
Can the below logic be implemented with the stream analytics builder?
Do you get any error messages? Please provide a full error message screenshot and log file.
Have you installed all the latest fixes for the products and systems you are using?