I have created an external table in Azure Synapse from a parquet file stored in an ADLS Gen2 container. I have used the following queries to create the datasource, the file format and the table:
GRANT REFERENCES ON CREDENTIAL::[https://XXXXX.dfs.core.windows.net/XXXXXXX] TO demoiics
IF NOT EXISTS (SELECT * FROM sys.external_file_formats WHERE name = 'SynapseParquetFormat')
CREATE EXTERNAL FILE FORMAT [SynapseParquetFormat]
WITH ( FORMAT_TYPE = PARQUET)
GO
IF NOT EXISTS (SELECT * FROM sys.external_data_sources WHERE name = 'XXXXX_XXXX_dfs_core_windows_net')
CREATE EXTERNAL DATA SOURCE [XXXXX_XXXXX_dfs_core_windows_net]
WITH (
LOCATION = 'abfss://XXXXXX@XXXXXX.dfs.core.windows.net',
CREDENTIAL = [https://XXXXX.dfs.core.windows.net/XXXXXXX]
)
GO
CREATE EXTERNAL TABLE XXXXXX.e_dim_channel3 (
[infa_operation_time] nvarchar(4000),
[channel_key] bigint,
[channel_name] nvarchar(4000)
)
WITH (
LOCATION = 'contososales_f_dim_channel/**',
DATA_SOURCE = [XXXXX_XXXX_dfs_core_windows_net],
FILE_FORMAT = [SynapseParquetFormat]
)
GO
The file is in a Container that allows anonymous access:

Anyway, I have added the database user as a "Storage blob data contributor" (And "data reader", just in case) in the storage account:

The problem is that it is not possible to query the data of the external tables from external clients, such as "SQL Server Management Studio", we always receive the same error:
External table 'XXXXXX.e_dim_channel3' is not accessible because content of directory cannot be listed.
Any idea?
Thanks.
and upvote
for the same. And, if you have any further query do let us know.