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
PBI-Adam-1001
New Member

Refresh error in Service but not PBI Desktop - Connecting to Snowflake

This error has started happening with any changes being made to the files.

 

We are connecting to Snowflake from PBI service using basic credentials. Here is the error:

 

  • Data source errorDataSource.Error: <pii>ODBC: ERROR [42000] SQL compilation error: error line 111 at position 31 invalid identifier 'OTBL.ENDO'</pii>. DataSourceKind = <pii>Snowflake</pii>. DataSourcePath = <pii>url.com;server</pii>. OdbcErrors = <pii>#table({"SQLState", "NativeError", "Message"}, {})</pii>. ;ODBC: ERROR [42000] SQL compilation error: error line 111 at position 31 invalid identifier 'OTBL.COLUMN1'. The exception was raised by the IDbCommand interface. Table: TABLE1.

PBI service creates an SQL script in Snowflake which looks like the below. The same is not created on PBI Desktop. Any ideas, please?

 

select
"COLUMN1",
"COLUMN2"
from
(
select
"COLUMN1",
"COLUMN2",
"C2",
case
when "ITBL"."C2" = "OTBL"."COLUMN1"
then ?
else ?
end as "C1"
from
(
select "OTBL"."COLUMN1",
"OTBL"."COLUMN2"
"ITBL"."C1" as "C2"
from "DATABASE"."SCHEMA"."TABLE2" as "OTBL"
left outer join
(
select "POLICY_NUM",
max("COLUMN1") as "C1"
from "DATABASE"."SCHEMA"."TABLE1"
group by "COLUMN2"
) as "ITBL" on ("OTBL"."COLUMN2" = "ITBL"."COLUMN2")
) as "ITBL"
) as "ITBL"
where "C1" = ?

 

 

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @PBI-Adam-1001 


Can you please make sure that you have got the latest version of the Power BI On-Premise gateway installed to make sure it matches the Power Query Engine in Power BI desktop?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thanks for the reply.

 

We are not using a gateway. It is using the Snowflake connector using basic credentials.

 

PBI connects to Snowflake but it creates a query that uses syntax not recognised by Snowflake, and this is what causes the error.

Hi @PBI-Adam-1001 

 

I would suggest maybe installing the latest version of PBI Desktop, open your PBIX and then re-publish the PBIX file?


The reason for this is the newer version of PBI Desktop might have additional updates?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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