XML/JSON File Source

Adding an XML/JSON file source object to a dataflow allows you to read and transfer data from an XML or a JSON file.

Getting XML/JSON Source Object

In this section, we’ll cover how to get XML/JSON File Source object on the dataflow designer from the toolbox.

  1. To get an XML/JSON File Source from the Toolbox, go to Toolbox > Sources > XML/JSON File Source. If you’re unable to see the toolbox, go to View > Toolbox or press Ctrl + Alt + X.

    ../_images/1-1571032665638.png

  1. Drag-and-drop the XML/JSON File Source object onto the designer.

    ../_images/215.png

    You can see that the dragged source object is empty right now. This is because we haven’t configured the object yet.

Configuring the XML/JSON File Source Object

  1. To configure the XML/JSON File Source object, right-click on the header and select Properties from the context-menu.

    ../_images/312.png

    When you select the Properties option from the context menu, a dialog box will open.

    ../_images/47.png

    This is where you configure the properties for the XML/JSON File Source object.

  2. The first step is to provide the File Path & Schema Location for the XML/JSON Source. By providing the file path and schema, you are building the connectivity to the source dataset.

    ../_images/57.png

    • Check on JSON Format if your source file is a JSON.

    • Check on Provide Inner XML to get the XML markup representing only the child nodes of the parent node.

      Note: In this case we are going to be using an XML/JSON file with Orders data in the parent node and Order Details in the child node.

      ../_images/68.png ../_images/77.png

  3. Once you’ve specified the data reading options on this screen, click Next.

    ../_images/87.png

    On this screen, you can view the layout of your XML/JSON source file in the left column of the screen.

    ../_images/97.png

  4. After you’re done viewing the layout, click Next on the bottom right of the screen. You will be taken to a new screen -Config Parameters. Here, you can define the parameters for the XML/JSON File Source.

    Parameters can provide easier deployment of flows by eliminating hardcoded values and provide an easier way of changing multiple configurations with a simple value change.

    Note: Parameters can be changed in the Config Parameters wizard page. Parameters left blank will use their default values assigned on the properties page.

    ../_images/107.png

  5. After you’ve configured the source object, click OK.

    ../_images/1111.png

    The XmlJsonSource object has now successfully been configured.

    ../_images/126.png

The fields from the source object can now be mapped to other objects in a dataflow.