Hi,
We have a Windows Service program that manages the creation of MongoDB collections and documents on specific MongoDB database. Basically, this program was implementated using C# that utilized DataDirect 8.0 MongoDB ODBC driver for data connections.
However, when our client app tries to access this database to retrieve those collections have been created it appears
the MongoDB ODBC driver can't discovered them. In our client app, we've been using REFRESH MAP SQL extension (as describe in https://documentation.progress.com/output/DataDirect/jdbcreadmes/mongojdbcread.htm) to perform discoveries of newly added
mongodb collections.
Is this known issue?
Cheers,
Jhessie
Hi Jhessie,
Can you clarify exactly how you are creating the new collections? Are you saying you're using the DataDirect driver to create the collections? (our MongoDB driver currently focuses on reading data and currently has limited ability to write data...so if you're attempting to create collections using the driver, that process is likely failing and is expected)
If the mongoDB collections are indeed getting created, the REFRESH MAP command should find them and update your schema assuming a few things are true: 1) the collection must contain at least 1 document. 2) the logged in user must have read access to the collection. 3) the driver must be connected to the mongodb database containing the new collection, or the user must have access to get a list of all databases on the Mongodb server. 4) You're using a recent driver build (refresh map wasn't included in the initial release). You need to be using "08.00.0078 (B0087, U0070, J000113)". Pay special attention to the "J000113" portion, this is the most important for the refresh schema functionality)
If you know the collections are being created successfully, and you've confirmed the 4 items above, then it's probably best to contact support, in an effort to get some logs to see exactly where things are going wrong.
Hope this helps!
Brody
Hi Jhessie,
Can you clarify exactly how you are creating the new collections? Are you saying you're using the DataDirect driver to create the collections? (our MongoDB driver currently focuses on reading data and currently has limited ability to write data...so if you're attempting to create collections using the driver, that process is likely failing and is expected)
If the mongoDB collections are indeed getting created, the REFRESH MAP command should find them and update your schema assuming a few things are true: 1) the collection must contain at least 1 document. 2) the logged in user must have read access to the collection. 3) the driver must be connected to the mongodb database containing the new collection, or the user must have access to get a list of all databases on the Mongodb server. 4) You're using a recent driver build (refresh map wasn't included in the initial release). You need to be using "08.00.0078 (B0087, U0070, J000113)". Pay special attention to the "J000113" portion, this is the most important for the refresh schema functionality)
If you know the collections are being created successfully, and you've confirmed the 4 items above, then it's probably best to contact support, in an effort to get some logs to see exactly where things are going wrong.
Hope this helps!
Brody
1. I created a collection called MyCollection with one document
2. I execute REFRESH MAP and the collection was synchronized to the schema definition file as expected
3. I perform standard SQL delete all query to that collection using the equivalent table name e.g. DELETE FROM MyCollection
4. I execute REFRESH MAP
5. I’m not seeing “MyCollection” after execute SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLES
Hi Jhessie,
Can you clarify exactly how you are creating the new collections? Are you saying you're using the DataDirect driver to create the collections? (our MongoDB driver currently focuses on reading data and currently has limited ability to write data...so if you're attempting to create collections using the driver, that process is likely failing and is expected)
If the mongoDB collections are indeed getting created, the REFRESH MAP command should find them and update your schema assuming a few things are true: 1) the collection must contain at least 1 document. 2) the logged in user must have read access to the collection. 3) the driver must be connected to the mongodb database containing the new collection, or the user must have access to get a list of all databases on the Mongodb server. 4) You're using a recent driver build (refresh map wasn't included in the initial release). You need to be using "08.00.0078 (B0087, U0070, J000113)". Pay special attention to the "J000113" portion, this is the most important for the refresh schema functionality)
If you know the collections are being created successfully, and you've confirmed the 4 items above, then it's probably best to contact support, in an effort to get some logs to see exactly where things are going wrong.
Hope this helps!
Brody
Flag this post as spam/abuse.
Hi Jhessie,
I agree, the behavior you're seeing in step 5 is not what I would expect. The "refresh map" command *should* be additive only. Therefore, the "myCollection" *shouldn't* disappear from the tables exposed via our driver after the "REFRESH MAP" command in step 4.
As a general FYI, the "refresh map" command is additive only since creating the map requires sampling and the resulting map can vary based on the data within the sample.
Going back to your issue specifically...I haven't had a chance to reproduce this myself (although I plan to), but I'd recommend opening a support case so you can request a patch with a fix (assuming we are able to reproduce it as you've described).
Thanks,
Brody