Page 1 of 1

MongoDB ODBC / SQL Server - query results showing truncated fields

Posted: Thu 31 May 2018 11:43
by sth31
Hello,

I am a demo user of the MongoDB ODBC driver, prior to purchase it if working, which is not fully the case so far...
I have configured from my sql Server instance a Link server connecting to a MongoDB database through the ODBC driver.
So far OK => set-up, connection, ...

The issue is that in my Select query result (launch from SQL Server editor) I found out that some fields are showing up as truncated in the result:
- Some columns are showing result string for up to 500+ characters.
- But one colum is only displaying a maximum of 158 (?) characters.

Investigating, I found out that there was a parameter within the ODBC configuration called 'Describe amount' => aimed at giving the number of 'sample' lines to be taken into account for data characterisation (types). Default to 25.
My first analysis was that the max size of the column was also determined as per a sample of 25 and some lines were truncated due to the fact that this sample is not showing long enough lines
=> So I have changed it to 200, then 500, then 100, then more than the total of lines in the source DB: no effect.
I have still some lines truncated, with the part kept being very limited (not talking about fieds with thousands of chars)

Any idea on how to fix this ?
Thanks in advance !

Re: MongoDB ODBC / SQL Server - query results showing truncated fields

Posted: Fri 01 Jun 2018 11:15
by azyk
We cannot reproduce the issue. Please use the contact form at our site:
https://www.devart.com/company/contactform.html and send us MongoDB document or JSON script to reproduce the issue. Also specify the exact version of MongoDB and SQL Server you are using.

Re: MongoDB ODBC / SQL Server - query results showing truncated fields

Posted: Mon 11 Feb 2019 13:14
by kethrine10
You can change the default size through the ODBC driver.



1. Open Data Sources (ODBC)

2. Locate Hive data source and click on Configure

3. On Simba Hive ODBC Driver DSN Setup, click on Advanced Options...

4. Change Default string column to the a higher value

MongoDB Tutorial

Re: MongoDB ODBC / SQL Server - query results showing truncated fields

Posted: Wed 13 Feb 2019 09:04
by ViktorV
As we wrote earlier, we cannot reproduce the issue. Please use the contact form at our site:
https://www.devart.com/company/contactform.html and send us MongoDB document or JSON script to reproduce the issue. Also specify the exact version of MongoDB and SQL Server you are using.