NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

PROBLEM STATEMENT


This dataset contains data of movies_data


Type the command "cqlsh"

Now you have a:

- Successfully running Cassandra environment

- Command line shell to interact with Cassandra using Cassandra Query Language (CQL)

Note: If you get an error message as "not connected", execute the commands sudo service cassandra start, sudo service cassandra status and cqlsh until you get the prompt as mentioned above.



Follow the instructions below to complete the assessment:

Step 1: Create a keyspace called movies_data with the replication strategy as SimpleStrategy and replication factor as 1.

Step 2: Once it's done under the keyspace Repositories, create a table called films_data with the following columns and their corresponding datatypes:


director_id

INT PRIMARY KEY

director_name

TEXT

num_critic_for_reviews

INT

duration

INT

director_facebook_likes

INT

actor_2_name

TEXT

gross

INT

actor_1_name

TEXT

movie_title

TEXT

num_voted_users

INT

cast_total_facebook_likes

INT

language

TEXT

country

TEXT

budget

INT

title_year

INT

imdb_score

DOUBLE

movie_facebook_likes

INT




Run the command "describe tables" films_data table will be listed if the table is created successfully


Step 3:

Using batch do the following things:

Insert the following data into the films_data table

108,Duncan Jones,275,123,0,Callum Rennie,46978995,Dominic Cooper,Warcraft?,111609,5505,English,USA,160000000,2016,7.3,89000
109,Alan Taylor,474,126,230,Emilia Clarke,89732035,J.K. Simmons,Terminator Genisys?,188457,38873,English,USA,155000000,2015,6.6,82000
110,Michael Apted,228,113,150,Shane Rangi,104383624,Bruce Spence,The Chronicles of Narnia: The Voyage of the Dawn Treader?,106446,764,English,USA,155000000,2010,6.3,11000

Step 4: Write a command to load the records from the "movie_metadata.csv" file into the water_quality table

Step 5: write a command to update the movie title to cars 2 whose director id is 42

Step 6: movie data is incorrect for the director id's 109,110 delete the entire rows

Step 7: write a command to retrieve the movies which as title year in 2013 , movie facebook likes greather than 100000 and budget greather than 100000000
Note: Store the results movies.txt
Format: (echo "<query command>") | cqlsh > filename.txt

Step 8: get the count of movies released in year 2016
Note: Store the results in movies_count.txt
Format: (echo "<query command>") | cqlsh > filename.txt

Step 9: create index released_year on title_year

Step 10: write a command to get the movie which has highest imdb score
Note: Store the results in imdb_score.txt
Format: (echo "<query command>") | cqlsh > filename.txt


After completing the challenge, run bash sample_test.sh to get the sample score

Note: Sample score does not depict the original score

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.