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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

BUG: VNET Gateway Issue

Standard PowerBI Gateway has no issues refreshing a dataset but when using the VNET Gateway we recieve this error:


Microsoft SQL: The size (8000) given to the convert specification 'nvarchar' exceeds the maximum allowed for any data type (4000).\r\nThe size (8000) given to the convert specification 'nvarchar' exceeds the maximum allowed for any data type (4000)

Status: Delivered

Hi all,

The deployment should be all completed now.


Best regards,

Community Support Team_yanjiang

Regular Visitor

Having the same issue reading from serverless to Power BI. (Europe).


Will issues a ticket to MS, so we get this fixed.

Regular Visitor

We are having the same issue from Serverless to Power BI (Europe)

Regular Visitor

We have the same issue (no VNET) with Synapse Serverless to PowerBI (Europe) . Not all Datasets are affected. It seems like these queries/tables are affected, when we Use "Reference" or "Duplicate" in PowerQuery.

Frequent Visitor

We have the same issue: Europe, Azure Synapse Serverless DB, import.

I opened a ticket and the MS Support Engineer wanted to check back with the product team, because there are mutliple factors in play and multiple users affected. 

Regular Visitor

We have the same issue : Europe, Azure Synapse, import. Anyone got any feedback from MS support regarding this issue? When will a fix be ready?  

Frequent Visitor

I have been given no ETA for a fix yet, just confirmation they are working on it. They have provided a workaround:  



I havent tried this myself yet but thought I would pass this on in case it helps anyone

Regular Visitor

Not really sure what exactly that means, but I see some fixes:

1. Download the dataset, update on desktop and upload back to Power BI

2. Change all views to cast from varchar(max) to smaller datatype like varchar(2000) or similar

3. Do as above mentioned by @Miss 

Advocate IV

Same here!! since Friday 05.05.23 the power bi refresh of synapse tables fails if a folded query step forces a number to text. Sadly we can' specify the length of the text in power query. It defaults to nvarchar(max) which causes the bug to appear.


The quick fix for this has been to force-disable query folding by adding a step that can't be folded. like adding and removing an index column. 

Regular Visitor

Problem also occures with tables in lake database.

Unfortunately the recommended string length while creating the tables is 8000 characters which apparently now is the culprit of that issue.

Since we do not use views on the lake database tables we are now changing the definition by hand for each column in each table, since Azure Synapse also does not support ALTER TABLE or ALTER COLUMN.


Needless to say that this is a huge pain...

Resolver I

In my case we have the data type defined Varchar<= 500 in all the attributes , no use of varchar(max) still it gives the datatype error.


I have raised a ticket with MS support , no firm solution or ETA on the fix.