Search code examples
hiveqlcreate-tableazure-hdinsight

HDInsight - Hive Create external table WASB


I'm having problems creating an external table. my storage service is named: sXX01, my default container is jdXX, the blob is named insurance.csv The hive script is:

drop table if exists Insurance; 
create external table Insurance(age STRING, sex STRING, bmi STRING, children STRING, smoker STRING, region STRING, charges STRING) 
row format delimited 
fields terminated by ',' 
stored as textfile location 'wasb://jdXX@sXX01.blob.core.windows.net/insurance.csv’;

the error is:

H110 Unable to submit statement. Error while compiling statement: FAILED: ParseException line 5:29 mismatched input 'wasb' expecting StringLiteral near 'location' in table location specification [ERROR_STATUS]

I get the same error - whether the actual blob exists or not, same error w/ 'hdfs://jdXX/insurance.csv' specification


Solution

  • the problem was the ' character. Through the process, I cut/pasted the query and the editor put a fancy (directional?) ' -- not the generic character