I am trying to import a file from my Azure blob storage into Azure managed instance.
So first I created a extrenal data source
CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'https://abcd.blob.core.windows.net/testFolder/',
);
then uploaded my csv file into blob storage
When I tried to query csv file,
SELECT * FROM OPENROWSET(
BULK 'product.csv',
DATA_SOURCE = 'MyAzureBlobStorage',
SINGLE_CLOB) AS DataFile;
I got,
Msg 4860, Level 16, State 1, Line 99 Cannot bulk load. The file "product.csv" does not exist or you don't have file access rights.
Can somebody help me to identify whats the issue here ?
Please verify the Shared Access Signature start and expiry date and time. Set the start date to any day last week. Verify "Allowed IP addresses" field is blank.
The SAS (Shared Access Signature) is a string that is created as follows:
Below a sample script.