Connecting to Azure blob store via Shared Access Key in SQL Azure DatawareHouse using Shared Access Signature

1.6k Views Asked by At

I am getting error when trying to connect to Azure blob storage from Azure Data WareHouse

Msg 105019, Level 16, State 1, Line 100
EXTERNAL TABLE access failed due to internal error: 'Java exception raised on call to HdfsBridge_Connect. Java exception message:
Parameters provided to connect to the Azure storage account are not valid.: Error [Parameters provided to connect to the Azure storage account are not valid.] occurred while accessing external file.'

CREATE DATABASE SCOPED CREDENTIAL AzureStorageCredential  
    WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
    SECRET = 'abcdeXXXXXXXXXXXXXXXXXXXXXXXXX';


CREATE EXTERNAL DATA SOURCE MyAzureStorage1 WITH (
        TYPE = HADOOP, 
        LOCATION = 'wasb://[email protected]/',
        CREDENTIAL = AzureStorageCredential  
    );


CREATE EXTERNAL TABLE dbo.MyExternalTable(   
    VendorID varchar(50) NULL,  
)  
WITH (  
        LOCATION='/2016/', DATA_SOURCE = MyAzureStorage1, 
        FILE_FORMAT = myfileformat,REJECT_TYPE = VALUE,REJECT_VALUE = 1000
        myfileformat,REJECT_TYPE = VALUE,REJECT_VALUE = 1000
    ) ; 

What could be not right ?

1

There are 1 best solutions below

1
On

PolyBase does not support SAS tokens. You will need to use the storage account key. For more information check ou https://learn.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-overview-load