Extract Data for Highest Sale Country

Extract data from the country with the highest number of sold items. It is easy to find the country with the highest number of sold items with: - a GroupBy node to calculate the number of sold items as sum(Quantity) by country; - then a Sorter node to sort the countries by decreasing number of sold items; - and finally a Row Filter node to extract only the first row (country) from the sorted list. Such country name now needs to be converted into the Value of a Flow Variable to overwrite the setting in the Row Filter node that extracts the data fro a given country. The necessary node here is TableRow To Variable. To consume a Flow Variable (that is to overwrite a configuration setting with the flow variable value) you can use: - the flow variable button on the side of the configuration setting - the Flow Variables tab in the node configuration window.

VIDEO: https://youtu.be/wJaDFElADmk
TAGS: flow variable, workflow variable, flow var

Extract Data for Highest Sale Country

 

Resources

EXAMPLES Server: 06_Control_Structures/03_Flow_Variables/04_Extract_Data_for_Highest_Sale_Country06_Control_Structures/03_Flow_Variables/04_Extract_Data_for_Highest_Sale_Country*
Download a zip-archive

 

 


* Find more about the Examples Server here.
The link will open the workflow directly in KNIME Analytics Platform (requirements: Windows; KNIME Analytics Platform must be installed with the Installer version 3.2.0 or higher). In other cases, please use the link to a zip-archive or open the provided path manually