· 6 years ago · Apr 26, 2019, 01:42 PM
1CREATE EXTERNAL TABLE if NOT EXISTS tweets(
2text STRING,
3retweeted_status STRUCT<
4 id_str:STRING>
5)
6ROW FORMAT SERDE
7STORED AS TEXTFILE;
8
9LOAD DATA INPATH '/imput/t*' OVERWRITE INTO TABLE tweets;
10
11SELECT count(text) FROM tweets WHERE retweeted_status.id_str is not NULL
12 and text RLIKE '[ ".,;]hon[ ".,;]'