enter image description hereNeed your help to find where I am exactly wrong.
Problem Statement - Run the following SQL in Azure Synapse: `
select top 10 * from
OPENROWSET(
BULK 'https://myxyzaccount.blob.core.windows.net/data/covid_12_31_2021.csv',
format = 'csv',
PARSER_VERSION = '2.0',
FIRSTROW = 2) as rows
`
Error Encountered - File 'https://myxyzaccount.blob.core.windows.net/data/covid_12_31_2021.csv' cannot be opened because it does not exist or it is used by another process.
Please note -
The blob (csv file) actually exists in the path. I don't have permission to assign roles using IAM in the storage account. Hence I cannot assign 'Blob Contributor or Reader' role (although I was able to create the Storage account all by myself).
I checked the documentation https://docs.microsoft.com/en-us/azure/synapse-analytics/sql/resources-self-help-sql-on-demand?tabs=x80070002#query-fails-because-file-cannot-be-opened. Please see the section Alternative to Storage Blob Data Contributor role
My understanding is, even if one is unable to grant authorization via storage account IAM, one can still let synapse access the required file using proper ACL assigment.
- My blob path is myxyzaccount/data/covid_12_31_2021.csv I added the MSI of Azure Synapse in the Container Root directory (data) and gave 'Execute' permission. Then I provided Read & Execute (as well as write) permission at the file (covid_12_31_2021.csv) level.
Yet, I am getting the same error, I pasted above. For your reference I am attaching screenshots of the ACL assignments at the container (root) and file level.
Can you please help what exactly I am doing wrong?
Thanks!!


