Simba Technologies
Simba Technologies

Simba MongoDB ODBC Driver with SQL Connector 2.3.2
Installation and Configuration Guide

Simba > Drivers > MongoDB > ODBC Installation Guide > Windows > Configuration > Configuring Advanced Options

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:

  1. 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.
  2. 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.
  3. 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.
  4. To return MongoDB String data as SQL_WVARCHAR instead of SQL_VARCHAR, select the Expose Strings as SQL_WVARCHAR check box.
  5. In the String Column Size field, type the maximum data length for String columns.
  6. To return MongoDB Binary data as SQL_LONGVARBINARY instead of SQL_VARBINARY, select the Expose Binary as SQL_LONGVARBINARY check box.
  7. In the Binary Column Size field, type the maximum data length for Binary columns.
  8. To configure the driver to create a column for retrieving or storing documents as JSON-formatted strings:
    1. Select the Enable JSON Read/Write Mode check box.
    2. In the JSON Column Size field, type the default column length for the JSON fields.
  9. 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.
  10. 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.
  11. Note:

    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.

  12. 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.


    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.
  13. Use the options in the Sampling area to configure how the driver samples data to generate temporary schema definitions:
    1. 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.
    2. 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.


    • 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.
  14. 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.
  15. To configure write-back behavior in the driver, click Writeback Options. For more information, see Configuring Write-Back Options.
  16. To save your settings and close the Advanced Options dialog box, click OK.
  17. To close the Simba MongoDB ODBC Driver DSN Setup dialog box, click OK.
rtext">Magnitude Support Community