Skip to main content
4 / 9
Completion requirements

2. Creación de tablas en el virtualizador

Creating Tables in the Virtualizer

Now we will create the necessary tables in the catalog (virtualizer), pointing to the files previously uploaded to HDFS:

In the Rocket project we created earlier, go to the catalog:

Then, create a new query to execute the following three statements:


CREATE TABLE german_credit_data_[unique_id] 
(ID INT, Age INT, Sex STRING, Job INT, Housing STRING, Saving_accounts STRING, 
Checking_account STRING, Credit_amount INT, Duration INT, Purpose STRING, Risk STRING) 
USING csv OPTIONS ( header 'true', inferSchema 'true', 
path '/certification/governance/students/[your_folder_name]/german_credit_data.csv' )


CREATE TABLE client_credit_requests_today_[unique_id] (ID INT, Age INT, Job INT, Credit_amount INT,
 Duration INT, Purpose_car INT, Purpose_domestic_appliances INT, Purpose_education INT, 
 Purpose_furniture_equipment INT, Purpose_radio_TV INT, Purpose_repairs INT, 
 Purpose_vacation_others INT, Sex_male INT, Housing_own INT, Housing_rent INT, 
 Savings_moderate INT, Savings_no_inf INT, Savings_quite_rich INT, Savings_rich INT, 
 Risk_bad INT, Check_moderate INT, Check_no_inf INT, Check_rich INT, 
 Age_cat_Young INT, Age_cat_Adult INT, Age_cat_Senior INT) 
 USING csv OPTIONS ( header 'true', inferSchema 'true', 
 path '/certification/governance/students/[your_folder_name]/clients_today.csv' )


CREATE TABLE client_external_info_[unique_id] (ID INT, LegalCase INT, FraudSuspicion INT, 
PoliceReport INT, ContactAudit INT, UkvCheck INT, AddressFraudCheck INT) 
USING csv OPTIONS ( header 'true', inferSchema 'true', 
path '/certification/governance/students/[your_folder_name]/external_list.csv' )

Now, return to the catalog and verify that your tables have been created.