本文主要是介绍Hive SQL报错:SemanticException [Error 10004]: Invalid table alias or column reference,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Hive SQL报错:SemanticException [Error 10004]: Invalid table alias or column reference
在python脚本中执行Hive SQL
python脚本如下:
sql="""SELECT
test_url,
(case
when substring_index(test_url, '/', 1) == 'dev.test.com`:`1024/' then substr(test_url,25)
when substring_index(test_url, '/', 1) == 'localhost:80/' then substr(test_url,21)
else test_url
end) as test_url_cleaned,
page_title,
FROM test.report_table
where dt = '%s' and web_id in
(
select web_id FROM dev.dev_report
) """% (num)
执行python脚本过程中报错:
FAILED: SemanticException [Error 10004]: Line 73
这篇关于Hive SQL报错:SemanticException [Error 10004]: Invalid table alias or column reference的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!