Setting runtime connection properties
You can set runtime connection properties for a MongoDB database connection in Advanced Data Set Run-time Properties or on the Property Binding page in the Data Set Editor. To display Advanced Data Set Run-time Properties, choose Advanced Settings on the Query page of the Data Set Editor.
The following runtime connection properties are available:
*Maximum result objects in a batch
The maximum number of result objects fetched in one batch by the MongoDB cursor. A MongoDB cursor typically fetches a batch of result objects and stores them locally. This value can be adjusted to optimize performance and limit data transfer. The smaller the value, the faster the response time. The higher the value, the fewer the calls to fetch data. The default value is 100. A zero or negative value is ignored.
*Maximum documents to search for metadata
The number of documents to process to obtain query result set metadata at runtime. The default value is 10. This value is different from the value in Number of Documents to search for fields on the Query page, which is only applicable at design time.
*Maximum documents to skip
Skips the first n documents in the result set. The default value is 0. For example, a collection contains 100 documents. If you set this property to 25, the result set contains documents 26 through 100.
*Index hint expression
Contains a string value in Mongo JSON hint expression syntax that lists one or more index keys. A query uses index keys for query optimization.
*Query cursor read preference
The read preference of a query cursor operation.
*Mode
Set to primary, primaryPreferred, secondary, secondaryPreferred, or nearest. The default is primary.
*Tag set(s)
Sets of required tags configured for a member node. You can specify alternate tag sets as documents in an array, for example
[ { "datacenter" : "CA", "rack" : "1" }, {"region" : "US_West" } ]
Tags are not applicable for primary read preference.
*No cursor time out
The MongoDB server normally times out idle cursors after an inactivity period of 10 minutes to prevent excess memory use. Set to true to prevent this. The default is false.
*Allows partial results
When used with sharding on a mongos server, set to true to allow partial results if any shards are down or missing from the cluster. If set to false, the mongos server returns an error. The default is true.
*Flatten nested collections
Set to true to flatten multi-level fields in an array or collection into multiple data set rows. This setting also applies to an array of scalar values. The default is false. By default, field values are concatenated into a single string value in a result set column. For example, the following result set contains three records with Flatten nested collections set to false.
[{"followed":true,"ratings":[1.1,2.1,3.1]},{"followed":false,
"ratings":[1.1,2.1,3.1]}]
[{"followed":true,"ratings":[1.2,2.2,3.2]},{"followed":false,
"ratings":[1.2,2.2,3.2]}]
[{"followed":true,"ratings":[1.3,2.3,3.3]},{"followed":false,
"ratings":[1.3,2.3,3.3]}]
With Flatten nested collections set to true, the result set contains six records.
{"followed":true,"ratings":[1.1,2.1,3.1]}
{"followed":false,"ratings":[1.1,2.1,3.1]}
{"followed":true,"ratings":[1.2,2.2,3.2]}
{"followed":false,"ratings":[1.2,2.2,3.2]}
{"followed":true,"ratings":[1.3,2.3,3.3]}
{"followed":false,"ratings":[1.3,2.3,3.3]}
Data row flattening applies to only one nested collection in a data set. If you select multiple nested documents, the first nested collection field specified in the Selected fields property on the Property Binding page in the Data Set Editor is flattened. If no nested collection is selected, a top-level field that is an array of scalar values is flattened.