Task and prerequisites

Take the data.items array from JSON and create a flat CSV with a consistent column order.

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

{
  "data": {
    "items": [
      {
        "sku": "T01",
        "name": "Tea",
        "stock": 12
      },
      {
        "sku": "C01",
        "name": "Coffee",
        "stock": 5
      }
    ]
  },
  "generated": "demo"
}

Blocks, connections and exact settings

Explanatory diagramEnlarge ↗03. JSON: extract an array of nested records. Example 03 topology: 3 blocks, 2 connections. Node identifiers and ports from the configured graph are preserved.
Flow diagram 03

Example 03 topology: 3 blocks, 2 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_inventory_json
  • Read settings:
    • JSON record path: /data/items
    • Range: A1:C3
    • First row is the header: так
2
Column mapping
map
  • Mode: columns
  • Columns:
      • Name: SKU
      • Value: sku
      • Name: Name
      • Value: name
      • Name: Stock
      • Value: stock
3
Data export
out
  • Format: csv
  • File name: inventory
  • Purpose: download
  • Delimiter: ;
  • Time zone: Europe/Kyiv

Port connections

  • src 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_inventory_json",
        "options": {
          "json_path": "/data/items",
          "range": "A1:C3",
          "header": true
        }
      }
    },
    {
      "id": "map",
      "type": "mapping",
      "label": "map",
      "config": {
        "mode": "columns",
        "columns": [
          {
            "name": "SKU",
            "value": "sku"
          },
          {
            "name": "Name",
            "value": "name"
          },
          {
            "name": "Stock",
            "value": "stock"
          }
        ]
      }
    },
    {
      "id": "out",
      "type": "export",
      "label": "out",
      "config": {
        "format": "csv",
        "filename": "inventory",
        "destination": "download",
        "delimiter": ";",
        "timezone": "Europe/Kyiv"
      }
    }
  ],
  "edges": [
    {
      "source": "src",
      "target": "map",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "map",
      "target": "out",
      "source_port": "out",
      "target_port": "in"
    }
  ]
}

Expected result

SKUNameStock
T01Tea12
C01Coffee5

Run and verify

  1. Save the illustrated JSON as inventory.json and add it as a file source.
  2. Set json_path=/data/items and use the exact original names sku, name and stock in mapping.
  3. Run and check inventory.csv: two rows, without the generated metadata field.

Common errors

  • The file source uses JSON Pointer /data/items. This differs from the data.items path in a REST API connection.
  • The path must lead to records: an error in items produces a missing path or incorrect structure.
  • Mapping requires exact field names; SKU is the output name and sku the input name.