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
Wani_Muneer
Helper I
Helper I

MOngodb to Powerbi Integration

Please help with this issue.
I encountered an error while loading some tables into Power BI. The error message is:

"Failed to save modifications to the server. The error returned: 'OLE DB or ODBC error: [DataSource.Error] ODBC: ERROR [22018] [MongoDB][API] invalid character value for cast to type: Bit.'"

This error indicates that there is an issue with casting a character value to a Bit data type in the MongoDB API.

1 ACCEPTED SOLUTION

Hi @Wani_Muneer,

According to your error messages, I'd like to suggest you take a look at the following options if suitable for your requirement.

1. Data Type Mismatch: The error message mentions that a value in your MongoDB data may be incompatible with the expected data type (e.g., convert a non-numeric value to a numeric type).
Check the data types of the fields in your MongoDB collection to ensure that they align with the expected data types in your Power BI model.

 

2. Bit Data Type Issue: The specific mention of “Bit” in the error message indicates that there might be an issue with handling Boolean (true/false) values.
Verify if any Boolean fields (such as flags or indicators) in your MongoDB data are causing the problem. If you have Boolean fields, ensure that they are correctly represented in your MongoDB collection.

 

3. Special Characters or Encoding: MongoDB data may contain special characters (e.g., non-ASCII characters, control characters) that cause issues during data conversion.
Check if any field values contain unusual characters or need proper encoding. Consider cleaning or transforming the data before importing it into Power BI.

 

4. ODBC Driver Configuration: The ODBC driver acts as a bridge between MongoDB and Power BI.
Confirm that you have installed the correct MongoDB ODBC driver (matching your Power BI version and bit version) and configured it properly. Please also double-check the connection settings, including authentication details and server address.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Wani_Muneer ,

Can you please share some more detail information about this issue? They should help us clarify your scenario and test to troubleshoot.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi v-shex-msft
I'm currently working on fetching data from MongoDB database and transforming it for use in Power BI. However, I encountered some errors during the table loading process.

Wani_Muneer_0-1708699654407.png

 

 

Hi @Wani_Muneer,

According to your error messages, I'd like to suggest you take a look at the following options if suitable for your requirement.

1. Data Type Mismatch: The error message mentions that a value in your MongoDB data may be incompatible with the expected data type (e.g., convert a non-numeric value to a numeric type).
Check the data types of the fields in your MongoDB collection to ensure that they align with the expected data types in your Power BI model.

 

2. Bit Data Type Issue: The specific mention of “Bit” in the error message indicates that there might be an issue with handling Boolean (true/false) values.
Verify if any Boolean fields (such as flags or indicators) in your MongoDB data are causing the problem. If you have Boolean fields, ensure that they are correctly represented in your MongoDB collection.

 

3. Special Characters or Encoding: MongoDB data may contain special characters (e.g., non-ASCII characters, control characters) that cause issues during data conversion.
Check if any field values contain unusual characters or need proper encoding. Consider cleaning or transforming the data before importing it into Power BI.

 

4. ODBC Driver Configuration: The ODBC driver acts as a bridge between MongoDB and Power BI.
Confirm that you have installed the correct MongoDB ODBC driver (matching your Power BI version and bit version) and configured it properly. Please also double-check the connection settings, including authentication details and server address.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help 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.