title: java.lang.IllegalArgumentException: requirement failed: No output operations registered, so nothing to execute
body: <p>When I execute the code below give the error
  "java.lang.IllegalArgumentException: requirement failed: No output operations registered, so nothing to execute"
  Anybody can help me please?</p>
  
  <pre><code>    val ssc = new StreamingContext(sc, Seconds(1))
  
      val sqlContext = new org.apache.spark.sql.SQLContext(sc)
  
  
     var imput: SimpleDateFormat   = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",  Locale.ENGLISH)
     var dia: SimpleDateFormat   = new SimpleDateFormat("dd")
     var mes: java.text.SimpleDateFormat = new SimpleDateFormat("MM");
     var ano: java.text.SimpleDateFormat = new SimpleDateFormat("yyyy");
  
  var diacv: String = ""
  var mescv: String = ""
  var anocv: String = ""
  
  case class Data(diacv: String, mescv: String, anocv: String)
  
  val columns = Seq("timecol")
  
  
  val data = ssc.cassandraTable("smartgrids","analyzer_temp")
                .select(columns.map(ColumnName(_)).take(1):_*)
  
  
  val dstream = new ConstantInputDStream(ssc, data)
  
  
  class foo() {
  
  
  import sqlContext.implicits._
  
          val result = dstream.map(row =&gt; (
                       diacv = dia.format(imput.parse(row.toString())), 
                       mescv = mes.format(imput.parse(row.toString())), 
                       anocv = ano.format(imput.parse(row.toString()))
                     )           
         ).toDF()
  
               result.registerTempTable("result") 
  
              // return result
  }
  
  ssc.start()
  ssc.awaitTermination()
  </code></pre>