Hello @Bryan Wang ,
Welcome to the Microsoft Q&A platform.
New SQL script -> Select TOP 100 rows works with the files with below format (csv, json, parquet).
If your query fails with the error saying, File cannot be opened because it does not exist or it is used by another process' and you're sure both file exist and it's not used by another process it means serverless SQL pool can't access the file
. This problem usually happens because your Azure Active Directory identity doesn't have rights to access the file. By default, serverless SQL pool is trying to access the file using your Azure Active Directory identity. To resolve this issue, you need to have proper rights to access the file. Easiest way is to grant yourself 'Storage Blob Data Contributor' role on the storage account you're trying to query.
- Visit full guide on Azure Active Directory access control for storage for more information.
- Visit Control storage account access for serverless SQL pool in Azure Synapse Analytics
Reference: Query fails because file cannot be opened
Hope this helps. Do let us know if you any further queries.
------------
Please don’t forget to Accept Answer
and Up-Vote
wherever the information provided helps you, this can be beneficial to other community members.