If you work with data from web apps or APIs, then you are most likely familiar with the JSON data format. JSON stands for JavaScript Object Notation and it has become a popular method of storing data all over the web. Previously there was not an easy way to read a JSON file in SPSS Modeler. It is very exciting that there is a brand new extension on the IBM Predictive Analytics GitHub that can perform this task!

Below is a guide for using this extension for the first time. For this example, we will read a JSON file that is saved here.

Step by Step Guide

  1. In SPSS Modeler v16.0 or 17.0, it is not possible to create proper ‘source’ nodes with R code. However it is possible if you trick the software a bit: you just have to put a user input with fake fields before the Read JSON File node in order to make the stream start. In this example we put a User Input node with: Field a; Storage String; Values “a” (see the screenshot below).
  2. UserInput

  3. The “Read JSON File” node should be saved in the Field Ops palette when it is installed. Double click on this node to add it to the stream.
  4. Edit the node and fill in the fields:
  5. Browse for a File: choose the JSON file you want to import
    Specified path to array: Check the box if your JSON file is not an array. Then, specify the path to the array you want to display in your table. In our example the path would be “id_array”.


  6. Add an output node after the “Read JSON File” node, in order to visualize the data you gathered. For example you can start with a ‘Table’.
  7. Right click on the table and run the stream

Results and Interpretation
Your results should match the table below:

Below is a video walk through for this sample use case for this new extension:

For more information on using this extension, please see the documentation located here.

9 comments on"How to Read a JSON File in SPSS Modeler"

  1. Paul McQuesten August 03, 2015

    +1 Thanks!!

  2. Thank you very much; I will try this and get back to you if any problem arises.

  3. Hi,

    Has this feature been implemented as part of Modeler 18 release ?

  4. Saleem Shaikh May 21, 2017

    I am getting error that data and data model does not match

  5. yea me too. I am trying to import a json file from Watson Discovery and I get the data and data model does not match.

  6. Tamer Salama January 13, 2018

    I’ve updated the issue at – still having problems https://github.com/IBMPredictiveAnalytics/Read_JSON_File/issues/6

  7. Matt Jolume October 22, 2018

    There are some JSON to CSV / Excel converters around (e.g. https://json-csv.com) which may be a good sub-path for loading JSON into SPSS.

Join The Discussion

Your email address will not be published. Required fields are marked *