Azure / Azure/Azurite

SQL Server 2022 Polybase with Azurite - file in use?

Open
#2,399 3 comments 0 reactions 1 assignee Claimed by @EmmaZhu View on GitHub
blob-storage featureparity
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
Blob

### Which version of the Azurite was used?
3.28.0

### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
It comes with Visual Studio Community.

### What's the Node.js version?

### What problem was encountered?
Attempting to read a blob from Azurite using SQL Server 2022 Polybase results in error:
> File 'test-file.csv' cannot be opened because it does not exist or it is used by another process.

### Steps to reproduce the issue?
1. Configure Azurite to use HTTPS using the dotnet dev-cert.
2. Create a container and set its access level to public.
3. Upload a csv file to the container.
4. Create an external data source in a locally running non-containerized SQL Server 2022 and attempt to read the CSV from it:
```sql
CREATE EXTERNAL DATA SOURCE MyAzureStorage
WITH (
LOCATION = 'abs://localhost:10000/devstoreaccount1/test'
);

SELECT * FROM OPENROWSET(
BULK 'test-file.csv',
DATA_SOURCE = 'MyAzureStorage',
SINGLE_CLOB
) AS DataFile;
```
I can access the blob file with a browser from `https://localhost:10000/devstoreaccount1/test/test-file.csv`.
I got the external data source to work with a publicly available Azure Blob Storage so this issue looks Azurite-related.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.