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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
livesid
New Member

How to I get data type "mvarchar" and "mchar" in PowerBI?

Добрый день! У меня есть база даных, работающая на PostgreSQL. После получения данных типа "mchar" Power BI выдает ошибку :


DataSource.Error: При чтении данных от поставщика произошла ошибка: 'The field '_code' has a type currently unknown to Npgsql (OID 16396). You can retrieve it as a string by marking it as unknown, please see the FAQ.' . Колонка '_code' в базе PostgreSQL имеет тип данных "mchar", получается Power BI не работает с таким типом данных (mchar), такая же проблема с типом "mvarchar"?


Спасибо!

 

For English:
Good afternoon! I have a database running on PostgreSQL. After receiving data of type "string" Power BI gives an error:  " 'The field '_code' has a type currently unknown to Npgsql (OID 16396). You can retrieve it as a string by marking it as unknown, please see the FAQ.' ". The column '_code' in the PostgreSQL database has the data type" mchar ", it turns out Power BI does not work with this type of data (mchar), the same problem with the "mvarchar" type??
Thank you!

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@livesid,

 

You may try using CAST to convert data type in SQL statement.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
livesid
New Member

_code - "mchar" type; _description - '"mvarchar"  type_code - "mchar" type; _description - '"mvarchar" type

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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