无法加载配置单元(直线 table)|加载语句中 'inpath' 附近的 StringLiteral

Unable to load hive (beeline table) |StringLiteral near 'inpath' in load statement

我正在尝试使用直线从 HDFS 文件加载 table。我已经为它编写了 shell 脚本,它将 StagingSchema.hql 文件作为输入并加载 table.

load data  inpath ${hivevar:dataLocation} into table ${hivevar:sourceTable};

在 Shell 脚本中

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

虽然 运行 在脚本之上,但我遇到了以下异常

    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)

对此有任何指示吗?

能否尝试在加载语句中用单引号覆盖 inpath,

将路径 '${hivevar:dataLocation}' 中的数据加载到 table ${hivevar:sourceTable};