Icon

02_​Hive_​WritingToDB

02 Hive WritingtoDB Exercise Solution
Missing Values Strategy: 02_Hive_WritingToDB This workflow implements a missing value strategy. 1. It reads data from local Hive; 2. it selects table ss13pme; 3. it isolates rows with missing cow value and rows with not missing cow values; 4. it imports the data into KNIME; 5. it creates a model to predict values for cow; 6. it uses cow predictions to override missing income values; 7. it rebuilds the datasets with the predicted cow values instead of the missing values 8. it writes the results back into Hive.Make sure you have executed the /2_Hadoop/2_Exercises/00_Setup_Hive_Table workflow during your current KNIMEsession before running this workflow. removePUMA* &PWGTP*COW is NOT NULLCOW is NULLremove COWCOW to stringappend predictedCOW columnimport all rows where COW is NOT NULLpredict COWimport all rows whereCOW is NULLselect * from ss13pmeNode 207Connect to Local Big DataEnvironmentpopulate newTabletablecreate newTable table DB Column Filter DB Row Filter DB Row Filter DB Column Filter Number To String Decision TreePredictor DB Reader DecisionTree Learner DB Reader DB Table Selector Concatenate Create Local BigData Environment DB Loader DB Table Creator Missing Values Strategy: 02_Hive_WritingToDB This workflow implements a missing value strategy. 1. It reads data from local Hive; 2. it selects table ss13pme; 3. it isolates rows with missing cow value and rows with not missing cow values; 4. it imports the data into KNIME; 5. it creates a model to predict values for cow; 6. it uses cow predictions to override missing income values; 7. it rebuilds the datasets with the predicted cow values instead of the missing values 8. it writes the results back into Hive.Make sure you have executed the /2_Hadoop/2_Exercises/00_Setup_Hive_Table workflow during your current KNIMEsession before running this workflow. removePUMA* &PWGTP*COW is NOT NULLCOW is NULLremove COWCOW to stringappend predictedCOW columnimport all rows where COW is NOT NULLpredict COWimport all rows whereCOW is NULLselect * from ss13pmeNode 207Connect to Local Big DataEnvironmentpopulate newTabletablecreate newTable tableDB Column Filter DB Row Filter DB Row Filter DB Column Filter Number To String Decision TreePredictor DB Reader DecisionTree Learner DB Reader DB Table Selector Concatenate Create Local BigData Environment DB Loader DB Table Creator

Nodes

Extensions

Links