# XML/JSON File Source

Adding an *XML/JSON Source* object allows you to transfer data from an XML or JSON file. An example of what an XML/JSON file source object looks like is shown below.

![](https://3768133094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH4WCHHphSt0ALtMJlqot%2Fuploads%2F1Zl2hagV0ogZfDQHFaQ1%2F0.png?alt=media)

To configure the properties of an *XML/JSON Source* object after it was added to the dataflow, right-click on it and select *Properties* from the context menu.&#x20;

{% embed url="<https://youtu.be/OSbn6qVh_H0>" %}

The following properties are available:

* *File Path* – specifies the location of the source XML or JSON file. Using UNC paths is recommended if running the dataflow on a server.

{% hint style="info" %}
**Note:** To open the source file for editing in a new tab, click ![](https://3768133094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH4WCHHphSt0ALtMJlqot%2Fuploads%2FHWcvp100vHzIVbUXzLos%2F1.gif?alt=media)icon next to the *File Path* input, and select *Edit File*.
{% endhint %}

* *Schema File Path* – specifies the location of the XSD file controlling the layout of the XML source file.

{% hint style="info" %}
**Note:** Astera can generate a schema based on the content of the source XML file. The data types will be assigned based on the source file’s content.
{% endhint %}

To generate the schema, click ![](https://3768133094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH4WCHHphSt0ALtMJlqot%2Fuploads%2FXvf0U1FfbaQYpddr4Y3t%2F2.gif?alt=media)icon next to the *Schema File Path* input, and select *Generate*.

To edit an existing schema, click ![](https://3768133094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH4WCHHphSt0ALtMJlqot%2Fuploads%2FXCTF64yNafoCczuLeEoj%2F3.gif?alt=media)icon next to the *Schema File Path* input, and select *Edit File*. The schema will open for editing in a new tab.

* *Optional Record Filter Expression* – allows you to enter an expression to selectively filter incoming records according to your criteria. You can use *Expression Builder* to help you create your filter expression.

{% hint style="info" %}
**Note:** To ensure that your dataflow is runnable on a remote server, please avoid using local paths for the source. Using UNC paths is recommended.
{% endhint %}

{% hint style="info" %}
**Note:** To ensure that your dataflow is runnable on a remote server, please avoid using local paths for the source. Using UNC paths is recommended.
{% endhint %}
