Icon

05_​Data_​Manipulation_​optional_​Solution

Data Manipulation (optional) - Solution

Solution to exercise 5 for the KNIME Analytics Platform for Data Wranglers course
- Create a new feature using the Rule Engine node and the Constant Value Column node
- Concatenate and join data into one table


Exercise 5: Data ManipulationIn this exercise you add a transaction type and merge all data into one table 2a) Join the onsite purchases with the product prizes (bottom output of themetanode). Exclude columns that were created as intermediate columns insome data manipulation steps.2b) Create a new column "Type" that gets the value "Store - no CC" if thecustomer ID is not available, and "Store - CC" otherwise.2c) Create a new column "Type" with a constant value "OnlineStore" for theorders coming from the online store (top output of the second metanode)2d) Concatenate the online and onsite purchases 3) Join the transaction andcustomer data on the CustomerID(Hint: Use a right outer join) Add transaction typeAdd type transaction typeTop: Online purchasesBottom: Product pricesOne row per basket to one row per productAdd Priceand exclude superflous columns ConstantValue Column Rule Engine Concatenate Read data ononline purchases Tabletransformation Read cleanedcustomer information Read onsitetransactions data Resolve StructurProblems in Product Nr Joiner Joiner Exercise 5: Data ManipulationIn this exercise you add a transaction type and merge all data into one table 2a) Join the onsite purchases with the product prizes (bottom output of themetanode). Exclude columns that were created as intermediate columns insome data manipulation steps.2b) Create a new column "Type" that gets the value "Store - no CC" if thecustomer ID is not available, and "Store - CC" otherwise.2c) Create a new column "Type" with a constant value "OnlineStore" for theorders coming from the online store (top output of the second metanode)2d) Concatenate the online and onsite purchases 3) Join the transaction andcustomer data on the CustomerID(Hint: Use a right outer join) Add transaction typeAdd type transaction typeTop: Online purchasesBottom: Product pricesOne row per basket to one row per productAdd Priceand exclude superflous columns ConstantValue Column Rule Engine Concatenate Read data ononline purchases Tabletransformation Read cleanedcustomer information Read onsitetransactions data Resolve StructurProblems in Product Nr Joiner Joiner

Nodes

Extensions

Links