Uploaded image for project: 'Couchbase Spark Connector'
  1. Couchbase Spark Connector
  2. SPARKC-146

Add support for scope-level query and analytics RDD

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.2.0
    • None
    • None
    • None
    • 1
    • SDK46: Limit Err, CB++, Spark

    Description

       

      import com.couchbase.spark._
      import com.couchbase.client.scala.json.JsonObject
      import com.couchbase.client.scala.analytics.AnalyticsOptions
      val query = "SELECT ht.city,ht.state,COUNT(*) AS num_hotels FROM hotel ht GROUP BY ht.city,ht.state HAVING COUNT(*) > 30"
      val options = AnalyticsOptions(Scope = Some("inventory"))
      val result = sc.couchbaseAnalyticsQuery[JsonObject](query, options)
       
       
      result.collect().foreach(println)
      

       

      Environment :  Scala 2.12 and Spark 3.1.1

       

      The error message is

       

      command-1883199299897832:6: error: not found: value Scope val options = AnalyticsOptions(Scope = Some("inventory"))

       

      Attachments

        Activity

          People

            daschl Michael Nitschinger
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty