Login using Social Account
     Continue with GoogleLogin using your credentials
The objective of this step is to create an external table dictionary. This table contains English words and
their polarity. Polarity means if the word has positive, negative, or neutral sentiment. Since a tweet
consists of words, this table will help us in calculating the sentiment of the entire tweet.
Question-
How many rows are there in the dictionary table?
Launch hive console by typing the hive command in the web console.
hive
Create an external table dictionary. Run below command on the web console. ${env:USER}
gets replaced by your username automatically. dictionary table contains words and their polarity.
CREATE EXTERNAL TABLE dictionary (
type string,
length int,
word string,
pos string,
stemmed string,
polarity string
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE
LOCATION '/user/${env:USER}/SentimentFiles/SentimentFiles/upload/data/dictionary';
Sample rows of dictionary table are
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...