title: Getting data from one database and process and store it to another database using trident topology
body: <p>I want to get data from one database through a spout and process the data and store it in another database using trident.I am new to storm and trident and i am not sure how to implement it.I got the data from the database in a spout(separate java class which implements IRichSpout which is supported by trident) and i emit it as an object.I need to pass it to the trident topology for processing(counting the number of records) and storing it to a database.</p>
  
  <pre><code> TridentTopology topology = new TridentTopology();  
   TridentState wordCounts =
            topology.newStream("spout1",spout)
  </code></pre>
  
  <p>now the new stream takes a spout as an input i.e the syntax is</p>
  
  <pre><code> Stream storm.trident.TridentTopology.newStream(String txId, IRichSpout spout)
  </code></pre>
  
  <p>but i want to give the object emitted by the spout as an input to the stream for the trident to process and save to database.So how can i bring my spout class inside trident and pass it to new stream or should i combine both spout and trident as a same class??</p>
  
  <p>can someone help plz.....</p>