Read JSON

Read JSON Objects ..

Steel Wheels have several JSON data sources. You will create a simple workflow to extract the required reporting dataset.

In this Lab, you will configure the following step:

• JSON Input

To create a new transformation

  1. In Spoon, click File > New > Transformation:

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

  • By clicking New, then Transformation

  • By using the CTRL-N hot key

  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
      },
```

Notice that the delivery status can be Delivered | Returned

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

  1. Drag the ‘Json Input’ step onto the canvas.

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

Using the internal variable to point to configure file path.

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

  1. Close the Step.

Last updated