我编写了一个小 shell 脚本来自动化 Big SQL 和 HIVE 同步。代码如下
echo "Login to BigSql"
<path to>/jsqsh bigsql --user=abc --password=pwd
echo "login succesfull"
echo "Syncing hive table <tbl_name> to Big SQL"
call syshadoop.hcat_sync_objects('DB_name','tbl_name','a','REPLACE','CONTINUE');
echo "Syncing hive table TRAINING_TRACKER to Big SQL Successfully"
不幸的是,我收到消息:
Login to BigSql
Welcome to JSqsh 4.8
Type "\help" for help topics. Using JLine.
然后它进入 Big SQL 命令提示符。现在,当我键入“退出”并按 Enter 时,它会给我以下消息:
login succesful
Syncing hive table <tbl_name> to Big SQL
./script.sh: line 10: call syshadoop.hcat_sync_objects(DB_name,tbl_name,a,REPLACE,CONTINUE): command not found
我究竟做错了什么?