![](/img/trans.png)
[英]Track success or failure for hive queries running through shell script
[英]running hive command through shell getting error
hive -e "select key from hbcv_table a where a.col2 like \'%hello friend%\'" | sed 's/[\t]/,/g' >a.dat
得到錯誤像 -
尋找匹配的“”時出現意外的 EOF
任何人都可以請幫助如何解決它。
無需屏蔽單引號:
hive -e "select key from hbcv_table a where a.col2 like '%hello friend%'" | sed 's/[\t]/,/g' >a.dat
select 語句中的單引號應該按字面傳遞給 Hive。 在雙引號中,單引號具有字面意義。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.