Configuring Advanced Options
You can configure advanced options to modify the behavior of the driver.
For detailed information about the options on this page, see Advanced Driver Configuration Options
To configure advanced options:
- To access advanced options, open the ODBC Data Source Administrator where you created the DSN, then select the DSN, then click Configure, and then click Advanced Options.
- To retrieve data using double-buffering instead of single-buffering, select the Enable Double-Buffering check box. You can configure the buffer size using the Documents to fetch per block field.
- In the Documents to fetch per block field, type the maximum number of documents that a query returns at a time. This setting also determines the buffer size used when double-buffering is enabled.
- To return MongoDB String data as SQL_WVARCHAR instead of SQL_VARCHAR, select the Expose Strings as SQL_WVARCHAR check box.
- In the String Column Size field, type the maximum data length for String columns.
- To return MongoDB Binary data as SQL_LONGVARBINARY instead of SQL_VARBINARY, select the Expose Binary as SQL_LONGVARBINARY check box.
- In the Binary Column Size field, type the maximum data length for Binary columns.
- To configure the driver to create a column for retrieving or storing documents as JSON-formatted strings:
- Select the Enable JSON Read/Write Mode check box.
- In the JSON Column Size field, type the default column length for the JSON fields.
- To configure the driver to optimize joins between virtual tables and pass filtering and aggregation optimizations to the MongoDB database for handling, select the Enable Passdown check box.
- To allow data values to pass filtering operations even if the values are stored as a different data type than the specified filter term, select the Enable Mixed Type Filter check box.
Mixed type filtering requires the driver to scan the entire MongoDB collection. You can disable this feature to increase the driver's performance, but note that doing so also alters the results of your queries.
- Use the options in the Metadata area to specify the schema definition to use when connecting to the database:
- To configure the driver to use a schema definition stored in a JSON file, select Local File from the Mechanism drop-down list, and then click Browse and select the JSON file that you want to use.
- To configure the driver to use a schema definition stored in the MongoDB database that you are connecting to, in the Mechanism drop-down list, select Database.
Use the options in the Sampling area to configure how the driver samples data to generate temporary schema definitions:
For information about how to create a schema definition using the Schema Editor application, see the Schema Editor User Guide located in the installation directory of the driver.
- On Windows 7 or earlier, the guide is available from the Simba MongoDB ODBC Driver program group in the Start menu.
- On Windows 8 or later, you can search for the guide on the Start screen.
- In the Sampling Method list, select the sampling method to use. Select Forward to sample data sequentially starting from the first record in the database, or select Backward to sample sequentially from the last record, or select Random to sample a randomly selected set of records.
- In the Documents to sample field, type the maximum number of documents that the driver can sample to generate the schema definition. To sample every document in the database, type 0.
In the Step Size field, type the interval at which the driver samples a record when scanning through the database. For example, if you set this option to 2, then the driver samples every second record in the database starting from the first record.
To configure write-back behavior in the driver, click Writeback Options. For more information, see Configuring Write-Back Options.
To save your settings and close the Advanced Options dialog box, click OK.
To close the Simba MongoDB ODBC Driver DSN Setup dialog box, click OK.
- Make sure to configure the driver to sample all the necessary data. Documents that are not sampled do not get included in the schema definition, and consequently do not become available in ODBC applications.
- Typically, sampling a large number of documents results in a schema definition
that is more accurate and better able to represent all the data in the
database. However, the sampling process may take longer than expected
when many documents are sampled, especially if the database contains
complex, nested data structures.
- The sampling options set here are for fallback sampling by the driver only. The sampling behavior of the Schema Editor application is set separately.