Further updates to the analytics docs will come with future 4.0.x releases.
- enum couchbase.analytics.AnalyticsScanConsistency(value)
For use with
consistency, will allow cached values to be returned. This will improve performance but may not reflect the latest data in the server.
Valid values are as follows:
- NOT_BOUNDED = <AnalyticsScanConsistency.NOT_BOUNDED: 'not_bounded'>
- REQUEST_PLUS = <AnalyticsScanConsistency.REQUEST_PLUS: 'request_plus'>
- class couchbase.options.AnalyticsOptions(timeout=None, read_only=None, scan_consistency=None, positional_parameters=None, named_parameters=None, client_context_id=None, priority=None, metrics=None, query_context=None, raw=None, serializer=None)
Available options to for an analytics query.
Importing options from
couchbase.analyticsis deprecated. All options should be imported from
timeout (timedelta, optional) – The timeout for this operation. Defaults to global query operation timeout.
read_only (bool, optional) – Specifies that this analytics query should be executed in read-only mode, disabling the ability for the query to make any changes to the data. Defaults to False.
AnalyticsScanConsistency, optional) – Specifies the consistency requirements when executing the analytics query.
client_context_id (str, optional) – The returned client context id for this analytics query. Defaults to None.
positional_parameters (Iterable[JSONType], optional) – Positional values to be used for the placeholders within the analytics query. Defaults to None.
named_parameters (Iterable[Dict[str, JSONType]], optional) – Named values to be used for the placeholders within the analytics query. Defaults to None.
priority (bool, optional) – Indicates whether this analytics query should be executed with a specific priority level. Defaults to False.
query_context (str, optional) – Specifies the context within which this analytics query should be executed. This can be scoped to a scope or a collection within the dataset. Defaults to None.
Serializer, optional) – Specifies an explicit serializer to use for this specific analytics query. Defaults to
raw (Dict[str, Any], optional) – Specifies any additional parameters which should be passed to the analytics query engine when executing the analytics query. Defaults to None.
- class couchbase.result.AnalyticsResult
The rows which have been returned by the analytics query.
If using the acouchbase API be sure to use
async forwhen looping over rows.
Either an iterable or async iterable.
- Return type