Polybase folder or wildcard query returns no data on SQL 2019

Stefan Quinn 1 Reputation point
2022-09-30T23:06:30.467+00:00

According to point 5 of the documentation here https://learn.microsoft.com/en-us/sql/relational-databases/polybase/polybase-configure-azure-blob-storage?view=sql-server-ver15&WT.mc_id=Portal-Microsoft_Azure_Support
it suggests that querying folders works. Naturally all of the files would need to have the same structure.

We have Microsoft SQL Server 2019 (RTM-CU16-GDR) (KB5014353) - 15.0.4236.7 (X64) Standard Edition (64-bit) on Windows Server 2022 Datacenter 10.0 <X64> (Build 20348: ) (Hypervisor)
on an Azure VM and are querying files on an Azure StorageV2 (general purpose v2). We can successfully create and fetch data from a single file but not from a folder using a wildcard as proposed by the Microsoft d365 team.

When we attempt to query a folder with a wildcard i.e. "/folderName/*.csv" or "/folderName/" no data is returned but querying a single file works as expected.

External data source: TYPE = HADOOP, LOCATION = 'abfss://....
Single file works: LOCATION = 'Tables/test1.csv'
Wildcard doesn't work: LOCATION ='Tables/*.csv'

Any ideas would be appreciated. Apparently this method works with Synapse and SQL 2022...

cheers
UPDATE
I've managed to get the folder query to work but still stuck on the wildcard search.
I opened a ticket with Microsoft and they have said that the External Data Source abfss location can be problematic and that it should not have a folder name in it so you should use:
container@yourlake@wrqr .core.windows.net and NOT container@yourlake@wrqr .core.windows.net/folderName

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,338 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,705 questions
{count} votes