DataDirect MongoDB ODBC Driver v8.0- REFRESH MAP Issue

Posted by jhessie.g on 13-Sep-2015 16:43

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

Posted by Brody on 14-Sep-2015 08:05

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

Posted by jhessie.g on 15-Sep-2015 20:36

Hi Brody,
 
I appreciate your time and effort in responding to this thread. And yes, it would really makes sense to reach out to their support.
 
Cheers,
Jhessie
 

All Replies

Posted by Brody on 14-Sep-2015 08:05

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

Posted by jhessie.g on 15-Sep-2015 10:42

Hi Brody,
 
Many thanks for responding to my queries. Basically, we do have a backend application framework that can execute mixed queries like Standard SQL queries and NOSQL commands. I’ve been using your driver to fill some requirements for MongoDB. What I’ve noticed about the behavior of the driver after it executes REFRESH MAP is the collections aren’t  synchronize when there no documents in it. Basically, I have the following sequence on execution of batch mixed queries:
 

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

 
If the collection doesn’t have any documents and after I execute REFRESH MAP, are they also remove from schema definition file?
 
Cheers,
Jhessie
 
 
[collapse]
From: Brody [mailto:bounce-brodym@community.progress.com]
Sent: Monday, September 14, 2015 9:06 PM
To: TU.DD.Connect@community.progress.com
Subject: RE: [Technical Users - DataDirect Connect] DataDirect MongoDB ODBC Driver v8.0- REFRESH MAP Issue
 
Reply by 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

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Brody on 15-Sep-2015 15:02

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

Posted by jhessie.g on 15-Sep-2015 20:36

Hi Brody,
 
I appreciate your time and effort in responding to this thread. And yes, it would really makes sense to reach out to their support.
 
Cheers,
Jhessie
 

This thread is closed