0
votes

I am creating External table on hive which is mapped to Azure Blob storage

CREATE EXTERNAL TABLE test(id bigint, name string, dob timestamp, salary decimal(14,4), line_number bigint) STORED AS PARQUET LOCATION 'wasb://(container)@(Stroage_Account).blob.core.windows.net/test'

getting below exception

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.hadoop.fs.azure.AzureException com.microsoft.azure.storage.StorageException: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.)

The Storage Account that i am using here is not primary storage account that is attached to hdinsight cluster

Could some one help me how to solve this issue?

1

1 Answers

1
votes

I am able to resolve this issue by adding configuration below, i have done this through Ambari server

HDFS >>Custom core-site
fs.azure.account.key.(storage_account).blob.core.windows.net=(Access Key)

fs.azure.account.keyprovider.(storage_account).blob.core.windows.net=org.apache.hadoop.fs.azure.SimpleKeyProvider

Hive >> Custom hive-env

AZURE_STORAGE_ACCOUNT=(Storage Account name)

AZURE_STORAGE_KEY=(Access Key)