Icon

KNIME_​challenge13_​solution

KNIME_challenge13_solution
Challenge 13: Onsite and Online TransactionsLevel: MediumDescription: Your company keeps data related to online and onsite transactions in a tabular datasetwith the following format:Index Online Onsite1 A.6777-012 7736-013 L-2210341175-00-0000204 L-3210341175-00-0000205 F54546 B_7736-01-00-0000207 F5454 7736-01In this challenge, you are asked to extract digits from the transactions (which are related to the boughtproducts) given the following guidelines: (1) if the onsite transaction starts with “L”, then take its first 12digits; otherwise, take its first 6 digits; and (2) if the onsite transaction has a missing value, then takethe string from the online transaction.What is the most efficient way to perform this task? For the example above, you should produce thefollowing output column:Product Codes677701773601221034117500221034117500F5454773601773601Author: Victor Palacios Parse the "barely" structured table to table format create a cleaned onsite column, and define product code rulesbased on that 1)+---------------+| Product Codes |+---------------+| 677701 || 773601 || 221034117500 || 321034117500 || F5454 || 773601 || 773601 |+---------------+ Promote first row as header row Node 1parse dynamiccolumnsremove blank rowsSplit to columnsNode 8Node 9removeunwanted columnsNode 11clean Onsitefor special charproduct coderuleremove unwantedfields Table Creator Column Expressions Row Filter Cell Splitter Insert ColumnHeader Row Splitter Column Filter Unpivoting Column Expressions Column Expressions Column Filter Challenge 13: Onsite and Online TransactionsLevel: MediumDescription: Your company keeps data related to online and onsite transactions in a tabular datasetwith the following format:Index Online Onsite1 A.6777-012 7736-013 L-2210341175-00-0000204 L-3210341175-00-0000205 F54546 B_7736-01-00-0000207 F5454 7736-01In this challenge, you are asked to extract digits from the transactions (which are related to the boughtproducts) given the following guidelines: (1) if the onsite transaction starts with “L”, then take its first 12digits; otherwise, take its first 6 digits; and (2) if the onsite transaction has a missing value, then takethe string from the online transaction.What is the most efficient way to perform this task? For the example above, you should produce thefollowing output column:Product Codes677701773601221034117500221034117500F5454773601773601Author: Victor Palacios Parse the "barely" structured table to table format create a cleaned onsite column, and define product code rulesbased on that 1)+---------------+| Product Codes |+---------------+| 677701 || 773601 || 221034117500 || 321034117500 || F5454 || 773601 || 773601 |+---------------+ Promote first row as header row Node 1parse dynamiccolumnsremove blank rowsSplit to columnsNode 8Node 9removeunwanted columnsNode 11clean Onsitefor special charproduct coderuleremove unwantedfields Table Creator Column Expressions Row Filter Cell Splitter Insert ColumnHeader Row Splitter Column Filter Unpivoting Column Expressions Column Expressions Column Filter

Nodes

Extensions

Links