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