Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2841

scope.AnalyticsQueryAsync may construct Dataset query_context incorrectly?

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.3
    • 3.2.0
    • None
    • None
    • Impediment
    • 1

    Description

      See updated pull request https://github.com/couchbase/docs-sdk-dotnet/pull/168 for a (currently commented out) section of code which fails.

      This ran previously, as I'd created (manually) a dataset with the name "bucket.scope".

      However, the escaping of the name containing dash is important. I think the dotNet version generates as (in this case)

      `travel.sample.inventory` 

      whereas the Analytics dataset should be created (as per https://blog.couchbase.com/collections-simplify-your-analysis-with-couchbase-analytics/ ) like

      `traval-sample`.inventory 

      This means that now that I've corrected the Analytics setup, the dotNet sample fails with

       Unhandled exception. Couchbase.CouchbaseException: Analytics query failed: 24045

      This isn't a very detailed error message (can I introspect it to get more info?) but I suspect it's constructing the Dataset name wrongly and not finding it, (as some other SDKs do exactly that)

      Could you have a look and let me know if I've misunderstood usage?

      NB: for the time being I've commented out the documentation of this feature.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            This query/bug is required by DOC-7628 (to document the Scope Analytics feature)

            hakim.cassimally Hakim Cassimally added a comment - This query/bug is required by DOC-7628 (to document the Scope Analytics feature)
            jmorris Jeff Morris added a comment -

            Hakim Cassimally -

            I am pretty sure this is fixed but I don't think the query will work straight out of the box with travel-sample; the `airports-collection` alias will still need to be created to work with this query:

            SELECT airportname, country FROM `airports-collection` WHERE country='France' LIMIT 2;
            

            Once that is done, it works as expected.

            Jeff

            jmorris Jeff Morris added a comment - Hakim Cassimally - I am pretty sure this is fixed but I don't think the query will work straight out of the box with travel-sample; the `airports-collection` alias will still need to be created to work with this query: SELECT airportname, country FROM `airports-collection` WHERE country='France' LIMIT 2; Once that is done, it works as expected. Jeff

            People

              jmorris Jeff Morris
              hakim.cassimally Hakim Cassimally
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty