MongoDB driver truncating data

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
lstrjcam
Posts: 2
Joined: Tue 08 Sep 2020 15:55

MongoDB driver truncating data

Post by lstrjcam » Tue 08 Sep 2020 16:02

I am currently using Devart's ODBC driver for MongoDB to create a linked server from SQL Server. Whenever I try to pull data from MongoDB via a linked server call, it treats records from a certain field as if it is nvarchar(8). I have confirmed that there are documents in the collection being called with fields containing more than 8 characters, resulting in data being truncated. Is there any way to set it up so that the driver does not treat records from this field as nvarchar(8)? Thanks in advance!

ViktorV
Devart Team
Posts: 3004
Joined: Wed 30 Jul 2014 07:16

Re: MongoDB driver truncating data

Post by ViktorV » Wed 09 Sep 2020 13:42

To solve the issue, please try increasing the value of the "Describe amount" field in the "Advanced settings" tab of the ODBC Driver for MongoDB configuration dialog box.
It is recommended to set this value as close to the number of documents in the collection as possible.

lstrjcam
Posts: 2
Joined: Tue 08 Sep 2020 15:55

Re: MongoDB driver truncating data

Post by lstrjcam » Mon 14 Sep 2020 12:16

I have updated the value in the "Describe amount" field to a value higher than the number of documents in the collection. However, the data was still being truncated. Did we need to restart the server in order for the driver to pick up the update?

ViktorV
Devart Team
Posts: 3004
Joined: Wed 30 Jul 2014 07:16

Re: MongoDB driver truncating data

Post by ViktorV » Wed 16 Sep 2020 14:49

In order for us to be able to give you a detailed answer, we need to have a sample demonstrating the specified behavior.
Therefore, please create a dump of all of your collections, SQL query and sent it to us through the contact form (https://devart.com/company/contactform.html).

Post Reply