The Variable Row Filter is essential when working with many flow variables in a large workflow. It keeps the flow variables "traveling" through the workflow connection in a handy and human-readable size. Some possible use cases include:
Keeping the scope of flow variables precise to where they are needed without passing them to downstream nodes:
Upstream Filtering is the process of filtering only the necessary flow variables before they enter a component. This clarifies which flow variables are needed inside the component without opening it.
Downstream Filtering is the process of filtering flow variables after they exit a component. This ensures that only the necessary variables are passed on to the rest of the workflow.
Eliminating unnecessary flow variables after merging variables using the Merge Variables node.
You can download and run this workflow using your locally installed KNIME Analytics Platform. To ensure compatibility, use the latest version of the software.
Workflow Steps
Generating Flow Variables
Extract Context Properties: Output all the properties of the running workflow (name, path, etc.) as flow variables.
Data Generator: Generate a few rows and convert the row values of one column ("Universe_1_1") into flow variables.
Variable Creator: Artificially create six different flow variables, including the "setting" flow variable we want to keep.
Merging Flow Variables
Merge the more than thirty flow variables generated in the previous step.
Filtering Flow Variables
Direct Filtering: Use the Variable Filter node to filter the "setting" variable directly from the Merge Variables node.
Mid-Branch Filtering: Pass the flow variables through nodes like "Table Creator" and "Column Filter," then use the Variable Filter node connected to a table input port to filter the "setting" flow variable. You can connect other nodes with a table input port to the Variable Filter node.
Additional Port Filtering: Add another port (flow variable port) to the Variable Filter node and pass only the "setting" variable along with the one from the recently added port.
After filtering, you can pass a clean set of flow variables to downstream nodes and components, ensuring a well-organized and efficient workflow.