title: How to work with streaming data using azure functions?
body: <p>I have created a realtime solution using Azure services.
  It works based on the following architecture.
  NSE(National Stock Exchanges) -> AzureFunction -> EventHub ->Azure Stream Analytics -> Power BI.
  In the Azure Function, I wrote the following code.</p>
  
  <pre><code>module.exports = async function (context, myTimer) {
      var API = require('indian-stock-exchange')
      var NSEAPI = API.NSE;
      let promise = new Promise((resolve,reject)=&gt;{
          NSEAPI.getGainers()
          .then(function (response) { 
              context.log(response['data']); //return the api data
              resolve(response['data'])
      });
      });
      let result = await promise;
      result = JSON.stringify(result['data'])
      return result 
  };
  </code></pre>
  
  <p>I'm using the library here and that calls through the HTTP request but for the streaming, this not a right way, can you guys share any suggestion on my code or any changes on architecture workflow.</p>
  
  <p>Thanks in advance.</p>