Read JSON

Read JSON Objects ..

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

JSON input
  1. View the jsonfile.js

{% hint style="warning" %} Notice that the delivery status can be Delivered | Returned {% endhint %}

{% tabs %} {% tab title="1. JSON Input" %} {% hint style="info" %}

JSON Input

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

  1. Start Pentaho Data Integration.

{% hint style="info" %}

Windows - Powershell

{% endhint %}

{% hint style="info" %}

Linux

  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

Dummy

The Dummy step does process records. Its primary function is to be a placeholder for testing purposes. For example, to have a transformation, you need at least two steps connected to each other.

  1. To add the Dummy step, expand the ‘Flow’ category in the Design tab, and drag the Dummy step onto the canvas.

  2. Draw a Hop from the JSON Input to Dummy step.

➡️ Next: Finally RUN the Transformation

RUN the Transformation

Finally .. execute the transformation locally.

  1. Click the Run button in the Canvas Toolbar.

  2. Preview the data.

Preview data

Last updated

Was this helpful?