Task and prerequisites

Let the user choose a region and minimum amount without editing the flow itself.

This example uses demonstration data and settings. Validate the expected result in your own environment before connecting production destinations. Identifiers demo_* are illustrative: select your own training connections or sources in the editor. The JSON below shows the block and connection structure, not a ready-to-transfer flow archive.

Training input data

sales.csv

Order;Region;Amount
O1;North;1200
O2;North;400
O3;South;900

Blocks, connections and exact settings

Explanatory diagramEnlarge ↗12. Filter with a run parameter. Example 12 topology: 5 blocks, 4 connections. Node identifiers and ports from the configured graph are preserved.
Flow diagram 12

Example 12 topology: 5 blocks, 4 connections. Node identifiers and ports from the configured graph are preserved.

Add the listed blocks in the designer, open each block's properties and set these values. Names demo_* identify training sources and connections.

BlockSetting
1
File
src
  • Role: source
  • Source: demo_param_sales
  • Read settings:
    • Sheet: CSV
    • Range: A1:C4
    • First row is the header: так
    • Delimiter: ;
2
Run parameters
params
  • wizard: так
  • Title: Відбір продажів
  • Fields:
      • Name: SelectedRegion
      • Label: Регіон
      • Type: text
      • Required: так
      • Value: North
      • Name: MinAmount
      • Label: Мінімальна сума
      • Type: number
      • Required: так
      • Value: 500
3
Filtering
filter
  • Mode: all
  • Selection conditions:
      • column: Region
      • Operation: eq
      • value_mode: parameter
      • Parameter block: params
      • Parameter: SelectedRegion
      • column: Amount
      • Operation: gte
      • Numeric comparison: так
      • value_mode: parameter
      • Parameter block: params
      • Parameter: MinAmount
4
Column mapping
map
  • Mode: columns
  • Columns:
      • Name: Order
      • Value: Order
      • Name: Region
      • Value: Region
      • Name: Amount
      • Value: Amount
5
Data export
out
  • Format: csv
  • File name: selected_sales
  • Purpose: download
  • Delimiter: ;
  • Time zone: Europe/Kyiv

Port connections

  • src out → params in
  • params out → filter in
  • filter out → map in
  • map out → out in
Complete graph configuration as JSON
{
  "version": 3,
  "nodes": [
    {
      "id": "src",
      "type": "file",
      "label": "src",
      "config": {
        "role": "source",
        "source_id": "demo_param_sales",
        "options": {
          "sheet": "CSV",
          "range": "A1:C4",
          "header": true,
          "delimiter": ";"
        }
      }
    },
    {
      "id": "params",
      "type": "parameters",
      "label": "params",
      "config": {
        "wizard": true,
        "title": "Відбір продажів",
        "fields": [
          {
            "name": "SelectedRegion",
            "label": "Регіон",
            "kind": "text",
            "required": true,
            "value": "North"
          },
          {
            "name": "MinAmount",
            "label": "Мінімальна сума",
            "kind": "number",
            "required": true,
            "value": 500
          }
        ]
      }
    },
    {
      "id": "filter",
      "type": "filter",
      "label": "filter",
      "config": {
        "mode": "all",
        "predicates": [
          {
            "column": "Region",
            "op": "eq",
            "value_mode": "parameter",
            "parameter_block": "params",
            "parameter": "SelectedRegion"
          },
          {
            "column": "Amount",
            "op": "gte",
            "numeric": true,
            "value_mode": "parameter",
            "parameter_block": "params",
            "parameter": "MinAmount"
          }
        ]
      }
    },
    {
      "id": "map",
      "type": "mapping",
      "label": "map",
      "config": {
        "mode": "columns",
        "columns": [
          {
            "name": "Order",
            "value": "Order"
          },
          {
            "name": "Region",
            "value": "Region"
          },
          {
            "name": "Amount",
            "value": "Amount"
          }
        ]
      }
    },
    {
      "id": "out",
      "type": "export",
      "label": "out",
      "config": {
        "format": "csv",
        "filename": "selected_sales",
        "destination": "download",
        "delimiter": ";",
        "timezone": "Europe/Kyiv"
      }
    }
  ],
  "edges": [
    {
      "source": "src",
      "target": "params",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "params",
      "target": "filter",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "filter",
      "target": "map",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "map",
      "target": "out",
      "source_port": "out",
      "target_port": "in"
    }
  ]
}

Expected result

With SelectedRegion=North and MinAmount=500, only O1=1200 is returned. With SelectedRegion=South and MinAmount=500, only O3=900 is returned.

Run and verify

  1. Save the flow; parameters must precede the filter on the same active branch. After filtering, mapping retains only Order, Region and Amount.
  2. Run interactively, keep North and 500, and verify O1.
  3. Run again with South; obtain O3 without changing the graph.

Common errors

  • Specify parameter_block=params: the field name alone does not identify the source block.
  • mode=any lets through rows matching just one condition.
  • Do not name the parameter Region because that column already exists in the source: the parameter block adds its own columns. This is why SelectedRegion is used.