When attempting to establish a JDBC connection to a MongoDB database where the database name includes a hyphen ("-"), users encounter a connection failure. This failure is accompanied by an error message indicating an invalid schema name due to special characters being stripped.
JdbcConnectionWrapper::Connect failed. Error type: Jdbc error. Jdbc operation attempted: Connect. [42000:-4850: on SQLHANDLE] [Strategy][MongoDB JDBC Driver][MongoDB]Invalid schema name. The specified database may not exist or your user id may lack the necessary permissions to read from it. Another possibility is that the schema name contains special characters which have been stripped (see the 'specialCharBehavior' option for details). Schema name: example-test
1. Go to Workstation to create a new data source, including create a new Database connection to input the Host, Port, Database, Authentication mode and select the Database Login for the connection to Mongo DB.
The used connection string like below:
JDBC;DRIVER={com.Strategy.jdbc.mongodb.MongoDBDriver};URL={jdbc:Strategy:<mongo db URL>;DatabaseName=example-test;EncryptionMethod=noEncryption};To establish a JDBC connection to MongoDB when the database name includes a hyphen, please follow these steps:
1. Open Workstation Data Source to edit the MongoDB JDBC Database Connection.
2. Navigate to the "Advanced" tab to modify Advanced Settings.

3. Update the Driver Properties by adding the following property:
SpecialCharBehavior=Include;
SchemaMap=<self defined path>/Mongotest.config;