Take a look at the documentation: https://learn.microsoft.com/en-us/sql/relational-databases/polybase/polybase-configure-s3-compatible?view=sql-server-ver16
There is a part that mentions your exact same problem "cannot be listed".
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have the following script for accessing on-prem S3-compatible storage.
CREATE DATABASE SCOPED CREDENTIAL s3
WITH IDENTITY = 'S3 Access Key',
SECRET = '****:****' ;
END
GO
CREATE EXTERNAL DATA SOURCE ds_s3
WITH
( LOCATION = 's3://s3server.test.com:9000/'
, CREDENTIAL = s3
);
GO
-- query with error
SELECT *
FROM
OPENROWSET(
BULK 'testbucket/test1/*.parquet',
DATA_SOURCE = 'ds_s3',
FORMAT='PARQUET'
) AS src
GO
-- Error msg
-- Content of directory on path '/testbucket/test1/*.parquet' cannot be listed.
Additional information
I also accessed the parquet files using AWS CLI successfully, after I supplied the access key using aws configure command. aws s3 ls --endpoint-url https://s3server.test.com s3://testbucket/test1 --recursive
AWS CLI does not take * wildcard so the command below output nothing. But I do not think it is the issue. aws s3 ls --endpoint-url https://s3server.test.com s3://testbucket/test1/*.parquet --recursive
Thank you.
Take a look at the documentation: https://learn.microsoft.com/en-us/sql/relational-databases/polybase/polybase-configure-s3-compatible?view=sql-server-ver16
There is a part that mentions your exact same problem "cannot be listed".