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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Power BI Desktop Snowflake Refresh Fails: “Cannot Convert Null to Text” While Service Still Works

Hi all, I’m seeing a sudden Power BI Desktop refresh failure with Snowflake-backed Power Query tables. Has anyone else seen this with recent Power BI Desktop / Snowflake connector builds? Is there a known regression or recommended workaround?


Power BI Desktop version: 2.155.756.0
Install type: Microsoft Store app
Connector: native Snowflake connector
Pattern: Snowflake queries fail in Desktop, but the same SQL runs successfully in Snowflake and the dataset/report still refreshes in Power BI Service.

Representative M pattern:
let
Source =
Value.NativeQuery(
Snowflake.Databases(
"<snowflake_account>",
"<warehouse>",
[Implementation="2.0"]
){[Name="<database>"]}[Data],
"<native SQL query against a Snowflake view>",
null,
[EnableFolding=true]
)
in
Source

Desktop refresh error: cannot convert the value null to type Text.

 

Things already tried:

  • Restarted machine
  • Uninstalled/reinstalled Power BI Desktop
  • Cleared/re-authenticated data source credentials
  • Removed [Implementation="2.0"]
  • Removed [EnableFolding=true]
  • Replaced select * with explicit column casts
  • Tested multiple Snowflake queries/tables
Status: New
Comments
DatamirHub
Advocate I
I have the same issue here https://community.fabric.microsoft.com/t5/Desktop/Snowflake-Key-Pair-Authentication-not-working-on-t... and i just reverted to the version of May and works fine
Timo_Klein
New Member
Problem: The passphrase cannot be empty in the newest Powerbi version! (Fill in "test" in the passphrase input field) Solution (for me): Transform data --> Data source settings --> Edit Permissions --> Edit... --> click on KeyPair to show the input fields (did not show up for me at first) --> Fill in your username, private key and "test" for passphrase.
Anonymous
Not applicable
Hi @nokt3 I've seen this "Cannot convert null to type Text" error in Desktop but not in Service before. In Desktop, the newer native Snowflake connector v2.0 is stricter with nulls compared to Service. Try these 2 fixes that worked for me: 1. Force null handling in M : Wrap your columns with null checks before loading Table. TransformColumnTypes( #"PreviousStep", {{"ColumnName", type nullable text}} ) Replace ColumnName with the columns that can be null. Or use `type nullable text` for all text columns. 2. **Cast in Snowflake SQL itself**: Instead of relying on PQ to infer types, cast in your native query ```sql SELECT COALESCE(COLUMN_NAME, '') AS COLUMN_NAME FROM VIEW_NAME Most of the time it's because 1 column started returning NULL recently and Desktop v2.155 is failing on type conversion.Since Service uses a different gateway engine, it auto-converts nulls so it still works there.Let me know if step 1 fixes it. Also try switching back to Implementation="1.0" temporarily to test. Thanks