gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 21:14:59 25 4
gpt4 key购买 nike

我正在尝试使用beeline从HDFS文件加载表。我已经为此编写了shell脚本,该脚本以StagingSchema.hql文件作为输入并加载了表。

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

内幕脚本
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)

关于这个有什么建议吗?

最佳答案

您可以尝试在load语句的单引号内覆盖inpath吗?

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

关于hadoop - 无法在加载语句中的 'inpath'附近加载配置单元(直线表)| StringLiteral,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39025995/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com