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 |
A unique identifier for the response. |
UUID (UUID) |
clientContextID |
The client context ID of the request, if one was supplied —
refer to |
String |
signature |
The schema of the results. Present only when the query completes successfully. |
Object |
results |
An array of all the objects returned by the query. An object can be any JSON value. |
Any Type array |
status |
The status of the request. Values: |
String |
errors |
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 |
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 |
Warnings array |
metrics |
An object containing metrics about the request. |
Errors
Property | Schema | |
---|---|---|
code |
A number that identifies the error. |
Integer |
msg |
A message describing the error in detail. Refer to Error Codes. |
String |
Warnings
Property | Schema | |
---|---|---|
code |
A number that identifies the warning. |
Integer |
msg |
A message describing the warning in detail. |
String |
Common Metrics
Property | Schema | |
---|---|---|
elapsedTime |
The total time taken for the request, that is the time from when the request was received until the results were returned. |
String |
executionTime |
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 |
The total number of objects in the results. |
Integer (unsigned) |
resultSize |
The total number of bytes in the results. |
Integer (unsigned) |
errorCount |
The number of errors that occurred during the request. |
Integer (unsigned) |
warningCount |
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 |
An object containing the query plans, if requested. |
|
metrics |
An object containing metrics about the request. |
Plans
Property | Schema | |
---|---|---|
logicalPlan |
The logical plan. |
Object |
optimizedLogicalPlan |
The optimized logical plan. |
Object |
rewrittenExpressionTree |
The rewritten expression tree. |
String |
expressionTree |
The expression tree. |
String |
job |
The job details. |
Object |
The structure and content of query plans is expected to change as development of the query processor progresses. |