Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

ODBC Problem with mongoDB BI connector (MySQL)

Hi everybody.

Since 1 month, I am not able to load more than 500,000 (I have 590,000 more or less) lines from MongoDB using the ODBC connector. Let me explain: I use the lastest release of MongoDB 3.6 and I have installed the MongoDB BI connector, that means, I use the ODBC option of PowerBI to get data, as the Mongo BI connector fakes a MySQL ODBC connection.

The last 4 months, all went smoothly and I was able to load my 4,000,000 lines from MongoDB, but this month, the Refresh Data gives me an error (ODBC Driver Error) at the end of the import. That is to say, it reads all the lines, but when it finishes, it just crashes.

 

The Error is:

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error[DataSource.Error] ODBC: ERROR [22018][MySQL][ODBC 5.3 (a) Driver][mysqld-5.7.12 mongosqld v2.4.1].'.

 

Digging a bit, the ODBC error 22018 seems to be 2invalid character value for cast specification"...

The very strange thing is that when I try this using Excel: conecting to the exact same DSN, importing the exact same table, it reads the 590,000 lines without problem.

I have tested in PowerBI, it works for 480,000 lines but crashes for 590,000.

I have no idea about what could be the problem, and why it worked for 4,000,000 the last months.

 

Considering the type of the error, I don't really know if the number of lines is the cause of the problem...

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Lydia.

Indeed, I found the solution. And it is related to character encoding.

MySQL provides 2 ODBC drivers, ANSI driver and the Unicode driver. In the MongoDB documentiation, they advise to use the ANSI driver, but this is what provoques the error.

It seems to work fine with the Unicode Driver.

 

Thanks for your answer!

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

This issue continues i dont have answer:

Crisfon_0-1653680564305.png

 

elflakoconk
Helper II
Helper II

Hello there,

I got this same issue, and also tried with both options (ANSI - unicode), someone have solved in other way?

thanks a lot!

error_mongo.png

 

Anonymous
Not applicable

I'm facing the exact same error that MuthuLakshmi mentioned in the above comments and I've tried both the drivers still facing the same issue. I've wasted 2 days and found nothing, can somebody help?

 

Muthulakshmi-

"I'm able to connect to MongoDB, but while browsing through the tables in "Navigator" it is throwing the below error message:

 

DataSource.Error: ODBC: ERROR [HY000] [MySQL][ODBC 1.2(w) Driver][mysqld-5.7.12 mongosqld v2.12.0]Unknown database ''

Details:
DataSourceKind=Odbc
DataSourcePath=dsn=B1 Unicode DSN
OdbcErrors=Table

 

Tried with both drivers ANSI and Unicode. Kindly help."

 

TIA

Varun

v-yuezhe-msft
Employee
Employee

@Anonymous,

The above error is related to collation on MongoDB, what is the collation of your query? Do you have any foreign characters in the MongoDB data source?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lydia.

Indeed, I found the solution. And it is related to character encoding.

MySQL provides 2 ODBC drivers, ANSI driver and the Unicode driver. In the MongoDB documentiation, they advise to use the ANSI driver, but this is what provoques the error.

It seems to work fine with the Unicode Driver.

 

Thanks for your answer!

thank you ! this helped me as well. i was pulling my hair out for 3 days straight !

Anonymous
Not applicable

I had almost the same error and switching to a Unicode DSN also worked for me.

I'm able to connect to MongoDB, but while browsing through the tables in "Navigator" it is throwing the below error message:

 

DataSource.Error: ODBC: ERROR [HY000] [MySQL][ODBC 1.2(w) Driver][mysqld-5.7.12 mongosqld v2.12.0]Unknown database ''

Details:
DataSourceKind=Odbc
DataSourcePath=dsn=B1 Unicode DSN
OdbcErrors=Table

 

Tried with both drivers ANSI and Unicode. Kindly help.

@Anonymous,

Glad to hear the issue is solved, you can accept your reply as answer to close this thread.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors