Adding Data from XML and JSON Files
Data Prep Studio allows you to explore and open JSON and XML files.
Steps:
1. From the Preview Data window, select the Add More⦠button to launch the Select Data Source to Open dialog.
2. Choose JSON (or XML).
3. In the Open dialog that displays, navigate to the location of the file you wish to open, select the file, and then click Open.
The JSON Explorer displays.

Figure 4-24. The JSON Explorer. A similar explorer is also available when opening XML files.
XML and JSON files present a hierarchical arrangement of nodes or tables. Selecting a node (table) displays all of its fields on the right-hand side of the explorer and a preview of the data contained within it. When checked, the Use Simplified Column Names box located on the upper right-hand corner of the explorer instructs Monarch to eliminate extraneous characters (e.g., the @ sign) from column names.

Figure 4-25. The XML Explorer with a node selected.
Selecting a node also shows the number of rows it contains if this number is more than one.
4. Select a node to open by clicking on it.
5. Select Row Expand Arrays or Column Expand Arrays to display JSON arrays into rows or columns, respectively.
6. Select an Encoding Option if necessary.
7. Click OK.
Your table is loaded in the Preview Data window. You can select and add this table to your list of open tables as usual. For the rest of the exercises, however, this is not necessary.



