MongoDB ODBC / SQL Server - query results showing truncated fields

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
sth31
Posts: 1
Joined: Thu 31 May 2018 11:29

MongoDB ODBC / SQL Server - query results showing truncated fields

Post by sth31 » Thu 31 May 2018 11:43

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 !

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

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

Post by azyk » Fri 01 Jun 2018 11:15

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.

kethrine10
Posts: 1
Joined: Mon 11 Feb 2019 13:09

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

Post by kethrine10 » Mon 11 Feb 2019 13:14

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

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

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

Post by ViktorV » Wed 13 Feb 2019 09:04

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.

Post Reply