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.
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!
Solved! Go to Solution.
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!
This issue continues i dont have answer:
Hello there,
I got this same issue, and also tried with both options (ANSI - unicode), someone have solved in other way?
thanks a lot!
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
@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
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 !
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
101 | |
49 | |
19 | |
12 | |
11 |