Icon

01 Practicing with Traditional Databases - Solution

01 Practicing with Traditional Databases - Solution
Exercise 1: Practicing with Traditional DatabasesIn this exercise you'll create a database table, and load and manipulate airline data (US domestic flights in January 2007) in the database.1) Read the AirlineDataset.table file and connect to the H2 database by executing the nodes below2) Create a new table "airline" on the database based on the table specs of the local data table. Replace the existing table. Use dynamic settings.3) Insert the data into the airline database tablePerform the following tasks directly on the database using the DB nodes:4) Filter the data to flights that were not cancelled AND had Austin-Bergstrom International Airport ("AUS") as destination5) Write the filtered data into a new database table called "airline_Austin" 6) Read the airline_Austin table into KNIME7) Optional: Delete the cancelled flights directly on the database with the following statement in the DB SQL Executor node:DELETE from "PUBLIC"."airline" where "Cancelled" = 1; database.mv.dbremove airlineif existsInsert data into tableDeletecancelled flightsOnly AUSNot cancelledairline_AustinRead data into KNIMEAirlineDataset.tablecreate airline H2 Connector DB Table Remover DB Insert DB SQL Executor DB Row Filter DB ConnectionTable Writer DB Reader Table Reader DB Table Creator Exercise 1: Practicing with Traditional DatabasesIn this exercise you'll create a database table, and load and manipulate airline data (US domestic flights in January 2007) in the database.1) Read the AirlineDataset.table file and connect to the H2 database by executing the nodes below2) Create a new table "airline" on the database based on the table specs of the local data table. Replace the existing table. Use dynamic settings.3) Insert the data into the airline database tablePerform the following tasks directly on the database using the DB nodes:4) Filter the data to flights that were not cancelled AND had Austin-Bergstrom International Airport ("AUS") as destination5) Write the filtered data into a new database table called "airline_Austin" 6) Read the airline_Austin table into KNIME7) Optional: Delete the cancelled flights directly on the database with the following statement in the DB SQL Executor node:DELETE from "PUBLIC"."airline" where "Cancelled" = 1; database.mv.dbremove airlineif existsInsert data into tableDeletecancelled flightsOnly AUSNot cancelledairline_AustinRead data into KNIMEAirlineDataset.tablecreate airlineH2 Connector DB Table Remover DB Insert DB SQL Executor DB Row Filter DB ConnectionTable Writer DB Reader Table Reader DB Table Creator

Nodes

Extensions

Links