Create Map
- Last Updated:June 21, 2024
- 2 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
Attribute
CreateMap (cm)
Purpose
Determines whether the driver creates the internal files required for a relational map of the native data when establishing a connection.
Valid Values
0
| 1
| 2
Behavior
If set to 0
(No), the driver uses the pre-existing group of schema map files specified by the Schema Map option. If the files do not exist, the connection fails.
If set to 1
(ForceNew), the driver replaces the schema map files specified by the Schema Map option with a newly generated group at the same location.
Note: The 8.1 driver uses an improved normalization schema to expose the JSON structure of MongoDB data as a relational view. The new schema map files use the 8.1 normalization format, which is not expected to be backwards compatible with SQL queries written for the 8.0 schema format. Queries will need to be revised to accommodate for the differences.
If set to 2
(NotExist), the driver uses the pre-existing group of schema map files specified by the Schema Map option. If the files do not exist, the driver creates them.
Notes
-
When this option is set to
1
(ForceNew), the driver creates a backup of the 8.0 schema map files specified by the Schema Map option. At connection, if the driver detects a schema map file using the 8.0 format, it will rename the files using the following naming convention:<original_file_prefix>.<timestamp>.backup
The driver will then create a set of 8.1 schema map files using the location and or name specified by the Schema Map option. If no file name or prefix is specified, the driver will use the default file name.
-
You can refresh the collections and fields exposed by the driver in an existing relational view of your data with the SQL extension Refresh Map. Refresh Map runs a discovery against your native data and adds newly discovered collections and newly discovered fields in existing collections to the schema map. Note that this process is additive only and will not delete any pre-existing collections or fields, even if they are no longer available for sampling in the MongoDB database.
Default Value
2
(NotExist)