Analytics Query Responses

      +

      When you use Analytics Workbench, the Analytics Service returns a JSON array containing just the query results, separate from the query metrics or the query plan.

      When you use the Service API or the cbq Shell, the Analytics Service returns a JSON object, which includes the query results, query metrics, any warnings or errors, and the query plan. These are described on this page.

      Common Responses

      The Analytics Service returns the following responses in common with the Query Service.

      For more information on these common responses, refer to the Response Body section on the SQL++ for Query REST API page.

      Property Schema

      requestID
      optional

      A unique identifier for the response.

      UUID (UUID)

      clientContextID
      optional

      The client context ID of the request, if one was supplied — refer to client_context_id in Query Parameters.

      String

      signature
      optional

      The schema of the results. Present only when the query completes successfully.

      Object

      results
      optional

      An array of all the objects returned by the query. An object can be any JSON value.

      Any Type array

      status
      optional

      The status of the request.

      Values: "success", "running", "failed", "timeout", "fatal"

      String

      errors
      optional

      An array of error objects. Present only if 1 or more errors are returned during processing of the request. Each error is represented by an object in this list.

      Errors array

      warnings
      optional

      An array of warning objects. Present only if 1 or more warnings are returned during processing of the request. Each warning is represented by an object in this list.

      Note that you can specify the maximum number of warning messages to be returned in the query response — refer to max-warnings in Query Parameters. By default, no warnings are returned, even if warnings have occurred during processing.

      Warnings array

      metrics
      optional

      An object containing metrics about the request.

      Errors

      Property Schema

      code
      optional

      A number that identifies the error.

      Integer

      msg
      optional

      A message describing the error in detail. Refer to Error Codes.

      String

      Warnings

      Property Schema

      code
      optional

      A number that identifies the warning.

      Integer

      msg
      optional

      A message describing the warning in detail.

      String

      Common Metrics

      Property Schema

      elapsedTime
      optional

      The total time taken for the request, that is the time from when the request was received until the results were returned.

      String

      executionTime
      optional

      The time taken for the execution of the request, that is the time from when query execution started until the results were returned.

      String

      resultCount
      optional

      The total number of objects in the results.

      Integer (unsigned)

      resultSize
      optional

      The total number of bytes in the results.

      Integer (unsigned)

      errorCount
      optional

      The number of errors that occurred during the request.

      Integer (unsigned)

      warningCount
      optional

      The number of warnings that occurred during the request.

      Integer (unsigned)

      Analytics Responses

      In addition, the Analytics Service returns the following responses which are unique to Analytics.

      Property Schema

      plans
      optional

      An object containing the query plans, if requested.

      metrics
      optional

      An object containing metrics about the request.

      Plans

      Property Schema

      logicalPlan
      optional

      The logical plan.

      Object

      optimizedLogicalPlan
      optional

      The optimized logical plan.

      Object

      rewrittenExpressionTree
      optional

      The rewritten expression tree.

      String

      expressionTree
      optional

      The expression tree.

      String

      job
      optional

      The job details.

      Object

      The structure and content of query plans is expected to change as development of the query processor progresses.

      Analytics Metrics

      Property Schema

      processedObjects
      optional

      Number of processed tuples during query execution.

      Long (int64)