Project - Sentiment Analysis in Hive

10 / 10

In this step, we create a new table tweetsbi. We join tweets_clean and tweets_sentiment tables and store sentiment of each tweet. Each row of the tweetsbi table contains tweet id, timestamp, tweet text, country, and its sentiment

Question-

What is the country and sentiment of the tweet with id as 330043924896968707?

INSTRUCTIONS
  1. Launch hive console by typing the hive command in the web console.

    hive
    
  2. Create tweetsbi table. Run the below command in the Hive on your web console

    CREATE TABLE tweetsbi 
    STORED AS ORC
    AS
    SELECT 
    t.*,
    s.sentiment 
    FROM tweets_clean t LEFT OUTER JOIN tweets_sentiment s on t.id = s.id;
    

    Sample rows of tweetsbi table are


Now we have a sentiment of each tweet along with country from where this tweet was tweeted. In the next project, we will visualize the sentiment of the "Iron Man 3" movie in different countries.


Note - Having trouble with the assessment engine? Follow the steps listed here


Loading comments...