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
MiquelDespuig
Frequent Visitor

Error Oracle ORA-12704 character set mismatch when refreshing dataset

Hello Community!

 

Since I've installed December 2020 updtade of the On-premise data gateway; a previously working dataset, which was connecting to an Oracle Datasource now throws an error related to the character set. So far I've checked the versions of the software I'm using and:

  • Power BI Desktop, Version: 2.87.1061.0 64-bit (november 2020)
  • Gateway, Version: 3000.68.8 (december 2020)

All other datasets connecting to the same datasource are working as expected. The error on the dataset refresh:

2020 12 14 027 715x196.png

 

Any clues why I'm getting this error now? The data set works perfectly fine in the Desktop version 🙄.

 

Thank you everyone for the help!!

1 ACCEPTED SOLUTION
MiquelDespuig
Frequent Visitor

After tinkering a lot with this problem. I've figured out how to avoid the problem and it works flawlessly although I don't really understand why.

The merge step generated by the power query editor is like so:

Table.CombineColumns(#"Removed Other Columns",{"IMDSC1", "IMDSC2"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Merged")

You get always this error:

QuoteStyle.None generatedQuoteStyle.None generated

 

The QuoteStyle.None function inside the Combiner.CombineTextByDelimiter makes the whole thing fail. If you remove this piece of code like so:

Table.CombineColumns(#"Removed Other Columns",{"IMDSC1", "IMDSC2"},Combiner.CombineTextByDelimiter(""),"Merged")

Magic happens:

QuoteStyle RemovedQuoteStyle Removed

 You get your data back as you would expect.

The reason why this is the problem escapes my understanding. On top of that the documentation on these functions is less than ideal. If anyone knows why this happens let me know! I'm now curious 😋

View solution in original post

6 REPLIES 6
MiquelDespuig
Frequent Visitor

After tinkering a lot with this problem. I've figured out how to avoid the problem and it works flawlessly although I don't really understand why.

The merge step generated by the power query editor is like so:

Table.CombineColumns(#"Removed Other Columns",{"IMDSC1", "IMDSC2"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Merged")

You get always this error:

QuoteStyle.None generatedQuoteStyle.None generated

 

The QuoteStyle.None function inside the Combiner.CombineTextByDelimiter makes the whole thing fail. If you remove this piece of code like so:

Table.CombineColumns(#"Removed Other Columns",{"IMDSC1", "IMDSC2"},Combiner.CombineTextByDelimiter(""),"Merged")

Magic happens:

QuoteStyle RemovedQuoteStyle Removed

 You get your data back as you would expect.

The reason why this is the problem escapes my understanding. On top of that the documentation on these functions is less than ideal. If anyone knows why this happens let me know! I'm now curious 😋

MiquelDespuig
Frequent Visitor

Still not working!

After near a year of dealing with the error I finally have some time to focus on trying to solve it. But with no success 😥. I'll try to add as much information as I can, and if someone has solved the same kind of error in another DBMS system may work as well.

Setup

Current running software versions at the time of writing:

  • Server Side
  • Client Side
    • Windows 10 Pro, Version 20H2, Build 19042.1165
    • Power BI Desktop 2.98.1025.0 64-bit (October 2021)
    • Oracle Data Access Components for Oracle 12.2.0.1.0

The Error

Originally, I found the error with the data gateway but, the error can be reproduced in Power BI Desktop as well. The error happens when:

  • Trying to merge two text columns with NCHAR (30) types without manually specifying its type first.

MiquelDespuig_0-1636975195602.png

 

  • The error always occurs on the native Oracle database connector. If you setup a connection with a DSN (Data Source Name) for an ODBC connection and repeat the same steps you're able to repeat the exact same steps without getting the error (loosing query folding 😮). Here's the code of the m query, and some screenshots to understand how the PBIX file is organized:

MiquelDespuig_1-1636976032973.png

The code for both queries is the same except for the source definition.

let
    Source = #"PRODDTA ODBC",
    Table = Source{[ Name = "F4101" ]}[Data],
    #"Removed Other Columns" = Table.SelectColumns ( Table, { "IMDSC1", "IMDSC2" } ),
    #"Merged Columns" = Table.CombineColumns (
        #"Removed Other Columns",
        { "IMDSC1", "IMDSC2" },
        Combiner.CombineTextByDelimiter ( "", QuoteStyle.None ),
        "IMDSC"
    )

in

    #"Merged Columns"
v-easonf-msft
Community Support
Community Support

Hi, @MiquelDespuig 

Could you please tell me whether your problem has been solved?
For now, there is no content of description in the thread. 

If you still have this issue for Power BI, you'd better create a support ticket in Power BI Support to get further help.

https://powerbi.microsoft.com/en-us/support/ 

 

Best Regards,
Community Support Team _ Eason

 

 

v-easonf-msft
Community Support
Community Support

Hi, @MiquelDespuig 

What  mode is used, directquery or import?

This error looks like the result of inconsistent data types in the table during the query, have you changed any data types of the columns in the oracle table or table name?

 

If the issue occurs only for this specific report , it is suggested to republish the  report to another workspace and reconfigure a new Oracle data source in the gateway.

 

Best Regards,
Community Support Team _ Eason

 

 

 

Hello @v-easonf-msft ,

 

First sorry for the late answer 😔!

 

The report is running on Import Mode. I haven't modified the query on the data-source, although I'll make a thorough check for mismatching data-types.

 

I've also tried to publish the report in my workspace and I got the same error. What a didn't try is to replace the gateway connection with a new one. Oracle connections are kind of tricky and chaning them may bite you, but I'll try anyways.

 

Thank you!! I'll let you know when finished!

In Power Query try this:

- Right click on your data column

- Scroll down to 'Transform'

- Click on 'Clean'

 

2023-09-08_9-46-03.png

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