我正在尝试使用以下查询运行map reduce作业,
SELECT b.userId, a.movieId, a.title, a.genre, b.rating
FROM streaming.movies a JOIN streaming.ratings b
ON a.movieId = b.movieId
WHERE a.genre LIKE '%Adventure%' OR a.genre LIKE '%Children% OR a.genre LIKE '%Action%' OR a.genre LIKE '%Fantasy%' OR a.genre LIKE '%Mystery%' OR a.genre LIKE '%Thriller%' OR a.genre LIKE '%Drama%' OR a.genre LIKE '%Romance%' OR a.genre LIKE '%Sci-Fi%' OR a.genre LIKE '%Comedy%' OR a.genre LIKE '%Horror%'
LIMIT 10;
Hive抛出一个错误,
Error: Error while compiling statement: FAILED: ParseException line 5:6 cannot recognize input near 'LIMIT' '10' '<EOF>' in expression specification (state=42000,code=40000)
有人能帮我吗?提前谢谢。
注意:我已经成功地使用“rlike”运行了我的作业。我试着用“喜欢”来锻炼。我喜欢的代码是,
WHERE a.genre RLIKE '.*(Adventure|Children|Action|Fantasy|Mystery|Thriller|Drama|Romance|Sci-Fi|Comedy|Horror).*'
1条答案
按热度按时间4ktjp1zp1#
尝试运行此查询
你失踪了
'
在LIKE '%Children%