Read JSON

Read JSON Objects ..

Workshop - Read JSON

JSON Input

Create a new Transformation

Any one of these actions opens a new Transformation tab for you to begin designing your transformation.

  • By clicking File > New > Transformation

  • By using the CTRL-N hot key

Placeholder for Read JSON
  1. View the jsonfile.js

{ "document": {
    "order": [ 
      { "productline": "Classic Cars",
        "customer": "Christine Loomis",
        "status": "Delivered",
	"date": "January 2004",
        "value": 21.99
      },
      { "productline": "Classic Cars",
        "customer": "Mary L. Peachin",
        "status": "Delivered",
	"date": "November 2008",
        "value": 24.99
      },
      { "productline": "Trains",
        "customer": "Bob Italia",
        "status": "Delivered",
        "date": "July 1994",
        "value": 14.99
      },
```

JSON Input

The JSON Input step extracts relevant portions out of JSON structures, files or incoming fields, and outputs rows.

  1. Start Pentaho Data Integration.

Windows - Powershell

Set-Location C:\Pentaho\design-tools\data-integration
.\spoon.bat

Linux

cd
cd ~/Pentaho/design-tools/data-integration
./spoon.sh
  1. Drag the ‘JSON Input’ step onto the canvas.

  2. Double-click on the step, and configure the following properties:

JSON input - File

Using the internal variable to point to configure file path.

  1. Click on the ‘Fields’ tab and configure the following properties:

JSON - fields
  1. Close the Step.

➡️ Next: Dummy

Link to Online JSON parser

Last updated

Was this helpful?