Icon

04 Components - Solution

Solution to an exercise for creating a component and using a shared component.

Create a component that filters data based on a user selection. Drag and drop a component from the KNIME Hub, and use it in your workflow.

CHECK YOUR ANSWERS:
1036 rooms are available in Manhattan for maximum $50 per night


Exercise: ComponentsRead the New York City Airbnb data by executing the CSV Reader node. Create a component that filters the data by maximum price and neighborhood group:1.1) Create a Value Selection Configuration node to select one neighborhood group in the data1.2) Filter the data based on the selected neighborhood group1.3) Create an Integer Configuration node to select the maximum price per night1.4) Filter the data to the rooms below or equal to this price per night. Notice that you need to type anynumber in the upper bound field in order to make the configuration option appear in the Flow Variablestab. 1.5) Encapsulate the configuration nodes and the Row Filter node into a component. Make sure that yourcomponent has a data output port that provides the filtered data! How many rooms are available inManhattan for maximum $50 per night?Apply data cleaning steps in an interactive view:2.1) Drag and drop the Interactive Data Cleaning component from the KNIME Hub or from the EXAMPLESServer2.2) Connect it to the File Reader node, execute, and open its interactive view2.3) Apply automatic type guessing, remove rows with missing values, and remove duplicate rows. ClickApply and Close. Read AB_NYC_2019data InteractiveData Cleaning CSV Reader Filter by neighborhood groupand maximum price per night Exercise: ComponentsRead the New York City Airbnb data by executing the CSV Reader node. Create a component that filters the data by maximum price and neighborhood group:1.1) Create a Value Selection Configuration node to select one neighborhood group in the data1.2) Filter the data based on the selected neighborhood group1.3) Create an Integer Configuration node to select the maximum price per night1.4) Filter the data to the rooms below or equal to this price per night. Notice that you need to type anynumber in the upper bound field in order to make the configuration option appear in the Flow Variablestab. 1.5) Encapsulate the configuration nodes and the Row Filter node into a component. Make sure that yourcomponent has a data output port that provides the filtered data! How many rooms are available inManhattan for maximum $50 per night?Apply data cleaning steps in an interactive view:2.1) Drag and drop the Interactive Data Cleaning component from the KNIME Hub or from the EXAMPLESServer2.2) Connect it to the File Reader node, execute, and open its interactive view2.3) Apply automatic type guessing, remove rows with missing values, and remove duplicate rows. ClickApply and Close. Read AB_NYC_2019data InteractiveData Cleaning CSV Reader Filter by neighborhood groupand maximum price per night

Nodes

Extensions

Links