JSON and XML Data Objects
You can create a flat file data object or complex file data object from a JSON or XML data source. You can create and run a column profile on the data object.
Create a text file that contains the path of the JSON or XML data source and use the text file as the data source to create a flat file data object. You can also add the file path for multiple JSON or multiple XML data sources into the text file.
You can create a complex file data object from a JSON or XML data source with a complex file reader. The complex file reader provides input to a Data Processor transformation that parses the file and converts the source data to flat comma-separated values records.
Note: The Developer tool does not support a JSON data source with UTF-8 encoding.
Creating a Data Object from a JSON or XML Data Source
You can create a flat file data object or complex file data object from a JSON or XML data source.
1. In the Object Explorer view in the Developer tool, select the project where you want to create the data object and column profile.
2. Click File > New > Data Object.
The New dialog box appears.
3. You can choose to create a flat file data object or complex file data object.
- - To create a flat file data object, perform the following tasks:
- 1. Select Physical Data Objects > Flat File Data Object, and click Next.
The New Flat File Data Object dialog box appears.
- 2. Select Create from an Existing Flat File, and click Browse to choose the text file. Click Next.
- 3. Verify that the code page is MS Windows Latin 1 (ANSI), superset of Latin 1, and the format is delimited. Click Next.
- 4. Verify that the delimiter is set to comma. Click Finish.
- - To create a complex file data object, perform the following tasks:
- 1. Select Physical Data Objects > Complex File Data Object, and click Next.
The New Complex File Data Object dialog box appears.
- 2. Enter a name for the data object. Select the access type as File.
- 3. Click Browse to choose a JSON or XML file. Click Finish.
When the Developer server is in Linux, you must update the file path of the data source to the location in the server. To update the file path, select the complex file data object, click Read in the Data Object Operations tab, and add the file path in the Advanced tab in the Data Object Operation Details pane.
The data object appears in the project folder.