display-medicalRead JSON

Read JSON Objects ..

circle-exclamation

Workshop - Read JSON

JSON Input

circle-info

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

circle-info

Notice that the delivery status can be Delivered | Returned


  1. Start Pentaho Data Integration.

circle-info

Windows - PowerShell:

circle-info

Linux:

circle-info

JSON Input

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

  1. Drag the ‘Get data from XML’ step onto the canvas.

  2. Drag the ‘JSON Input’ step onto the canvas.

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

JSON input - File
circle-info

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.

Link to Online JSON parser

circle-info

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.


circle-info

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?