Creating the database and table directly in SQL

To create the database, run the following query in the query editor:

CREATE DATABASE titanic_db;

Then select titanic_db in the database dropdown menu on the left side as follows:

To create the table and load the data, run the following SQL query:

CREATE EXTERNAL TABLE IF NOT EXISTS titanic_db.titanic (  pclass tinyint,  survived tinyint,  name string,  sex string,  age double,  sibsp tinyint,  parch tinyint,  ticket string,  fare double,  cabin string,  embarked string,  boat string,  body string,  home_dest string ) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' WITH SERDEPROPERTIES ...

Get Effective Amazon Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.