Packages

o

com.couchbase.spark.query

QueryOptions

object QueryOptions

Helper object to provide type-safe keys and values for Spark SQL query options.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QueryOptions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. val Bucket: String

    Option Key: The name of the bucket, which overrides the implicit bucket configured.

  2. val Collection: String

    Option Key: The name of the collection, which overrides the implicit collection (if configured at all).

    Option Key: The name of the collection, which overrides the implicit collection (if configured at all).

    Note: only works against Couchbase Server 7.0 or later.

  3. val ConnectionIdentifier: String

    Option Key: Instead of using the "default" connection, allows to connect to a different cluster.

  4. val Filter: String

    Option Key: a N1QL expression which acts as an additional filter on every query, including schema inference.

    Option Key: a N1QL expression which acts as an additional filter on every query, including schema inference.

    This is usually needed in pre-collection clusters where a predicate needs to be used to always filter the dataset. For example "type = 'airport'", but can be as complex as needed. This filter is always AND-combined with any filters that get pushed down from spark when actually performing the query.

  5. val IdFieldName: String

    Option Key: The field name of the document ID, used to override the default.

    Option Key: The field name of the document ID, used to override the default.

    The default can be located in DefaultConstants.DefaultIdFieldName

  6. val InferLimit: String

    Option Key: The limit of how many records to load during schema inference.

    Option Key: The limit of how many records to load during schema inference.

    The default can be found in DefaultConstants.DefaultInferLimit

  7. val NotBoundedScanConsistency: String

    Option Value: Not bounded scan consistency - to be used with ScanConsistency as the key.

    Option Value: Not bounded scan consistency - to be used with ScanConsistency as the key.

    This is the default and usually does not need to be specified. The query will be executed immediately, and it might not include documents which have just been written and not made it into the index yet.

  8. val PartitionColumn: String

    Option Values: Partitioning.

    Option Values: Partitioning.

    If any of the four following options are set, all must be.

    They will partition a single SQL++ query into multiple queries, so it can be executed by multiple Spark workers.

    As an example, if partitionColumn is set to "id", partitionLowerBound is 0, partitionUpperBound is 1000, and partitionCount is 3, then the multiple queries would look similar to this:

    SELECT [...] WHERE [...] AND id < 334 SELECT [...] WHERE [...] AND (id >= 334 AND id < 667) SELECT [...] WHERE [...] AND id >= 667

    The chosen partitionColumn must support the SQL comparison operators "<" and ">=". Any results where partitionColumn is null or otherwise not matched by those operators, will not be included.

    partitionLowerBound and partitionUpperBound do not bound or limit the results, they simply choose how many results are in each partition.

    partitionCount determines how many partitions the query will be split into.

  9. val PartitionCount: String
  10. val PartitionLowerBound: String
  11. val PartitionUpperBound: String
  12. val PushDownAggregate: String

    Option Key: If aggregates should be allowed to be pushed down by spark into the query engine.

    Option Key: If aggregates should be allowed to be pushed down by spark into the query engine.

    This value is true by default for performance reasons. It is available to be disabled should there be any issues identified in the field.

  13. val RequestPlusScanConsistency: String

    Option Value: Request plus scan consistency - to be used with ScanConsistency as the key.

    Option Value: Request plus scan consistency - to be used with ScanConsistency as the key.

    If this value is set, the indexer will wait until it has caught up to the recent mutations, which will make sure that documents which just have been written are part of the result set.

  14. val ScanConsistency: String

    Option Key: Allows to override the scan consistency for the query performed.

  15. val Scope: String

    Option Key: The name of the scope, which overrides the implicit scope (if configured at all).

    Option Key: The name of the scope, which overrides the implicit scope (if configured at all).

    Note: only works against Couchbase Server 7.0 or later.

  16. val Timeout: String

    Option Key: The timeout to use which overrides the default configured.

    Option Key: The timeout to use which overrides the default configured.

    The value is a string and must be parsable from a scala Duration.