The SQL script is auto-generated by PowerBI and it used WVARCHAR type where Dremio ODBC does not support it:
Unknown datatype name ‘WVARCHAR’
@poonhs-esquel Could you share a sample query generated by Power BI that causes this issue?
@superbstreak, i joined two tables from Dremio datasources using FACTORY key. The first batch data does not have problem to display, but when I scroll down and load the next batch of data. PowerBI query SQL as below to get the next batch.
Since the data involve Chinese words, it try to casts the data as WVARCHAR for some conditions checking and give error in Dremio.
select “FACTORY_ID”,
“CHN_NAME”,
“AGPO_NO”,
“GARMENT_FACTORY_CD”,
count( 1) as “C1”
from
(
select “OTBL”.“AGPO_NO”,
“OTBL”.“GARMENT_FACTORY_CD”,
“ITBL”.“FACTORY_ID”,
“ITBL”.“CHN_NAME”
from “eSCM_PROD.ESCMOWNER”.“AGPO_HD” as “OTBL”
left outer join “MES_ABC_PROD.MESDB.dbo”.“GEN_FACTORY” as “ITBL” on ( “OTBL”.“GARMENT_FACTORY_CD” = “ITBL”.“FACTORY_ID”)
) as “ITBL”
where ( ( not “AGPO_NO” is null or not “FACTORY_ID” is null) or ( not “CHN_NAME” is null or not “GARMENT_FACTORY_CD” is null)) and ( not “AGPO_NO” is null and “AGPO_NO” > ‘xxxxx’ or ( not “AGPO_NO” is null and “AGPO_NO” = ‘xxxxx’) and ( not “FACTORY_ID” is null and “FACTORY_ID” > ‘ABC’ or ( not “FACTORY_ID” is null and “FACTORY_ID” = ‘ABC’) and ( not “CHN_NAME” is null and cast( “CHN_NAME” as WVARCHAR) > ‘中文名’ or ( not “CHN_NAME” is null and cast( “CHN_NAME” as WVARCHAR) = ‘中文名’) and ( not “GARMENT_FACTORY_CD” is null and “GARMENT_FACTORY_CD” >= ‘ABC’))))
Profile please find here:
8c96d80d-7343-427e-b41d-d85ae2052fb6.zip (3.8 KB)
yeah, I have the same issue. I think it’s because of the Chinese characters.
Have you solved it?I have the same problem of using Power BI now.
Follow this link: How to support UTF8 encoding format?
It’s able to use unicode character, for example, select * from table_name where col1 = ‘中文’.
But in Power BI, it becomes select * from table_name where cast(col1 as wvarchar) = ‘中文’, and Dremio doesn’t support wvarchar date type.