Hello,
I apologize for not checking on this sooner.
This error occurs sporadically but only if a view in synapse is created using a wildcard.
For example:
DROP VIEW IF EXISTS A_View
GO
CREATE VIEW A_View AS
SELECT *
FROM OPENROWSET('CosmosDB',
Account= ACCOUNT;Database=DATABASE;Key=KEY',
A_Table)
AS A_Table
GO
Using the code above will result in "[Assertion failed: Number of data blocks does not match number of distinct files. This version of code supports having only one DataBlock per file.]" when trying to query the view, but not every time you query. It seems to be random.
The following resolved my issue:
DROP VIEW IF EXISTS A_View
GO
CREATE VIEW A_View AS
SELECT Column1,Column2,Column...
FROM OPENROWSET('CosmosDB',
Account= ACCOUNT;Database=DATABASE;Key=KEY',
A_Table)
AS A_Table
GO