I am trying to load table from HDFS file using beeline. I have written shell script for it which takes StagingSchema.hql file as input and loads table.
load data inpath ${hivevar:dataLocation} into table ${hivevar:sourceTable};
Inside Shell script
HIVE_DATA_LOCATION="hdfs:///app/data/empRecord.csv"
beeline -u $BEELINE_JDBC_URL -n $BEELINE_USERNAME -p $BEELINE_PASSWORD --hivevar sourceTable=$SOURCE_TABLE --hivevar dataLocation=$HIVE_DATA_LOCATION --silent=true -f StagingSchema.hql
While running above script , i am getting below exception
WARNING: Use "yarn jar" to launch YARN applications.
Error: Error while compiling statement: FAILED: ParseException line 1:23 mismatched input 'hdfs' expecting StringLiteral near 'inpath' in load statement (state=42000,code=40000)
Any pointers on this?