# Configuring CData Sync for Purchase-to-Pay

> Next to the **Upload data** option to load data for a **Purchase-to-Pay** process app, you can also use CData Sync to load data from files. This page describes how to use CData Sync to set up a source connection to load data from files into a Process Mining **Purchase-to-Pay** process app.

## Introduction

Next to the **Upload data** option to load data for a **Purchase-to-Pay** process app, you can also use CData Sync to load data from files. This page describes how to use CData Sync to set up a source connection to load data from files into a Process Mining **Purchase-to-Pay** process app.

In general, when you want to use CData Sync to load data from files, you should follow the steps as described in [Loading data using CData Sync](https://docs.uipath.com/process-mining/automation-cloud/latest/user-guide/loading-data-using-cdata-sync) to set up data loading using CData Sync.

Since specific settings are required when loading data from files into **Purchase-to-Pay**, pay attention to the steps described in the follwoing sections.

## Purchase-to-Pay specific steps when configuring CData Sync

### Setting up the source connection

Select **CSV** as the source system to which you want to create a connection from the list, and make sure to define the settings as described in [Loading Data Using CData Sync - Create a Source Connection](https://docs.uipath.com/process-mining/automation-cloud/latest/user-guide/create-a-source-connection).

### Table replication

Once the job is correctly setup, create a **Custom Query** paste the following queries (*each query needs to maintain the semicolon at the end*). Make sure you **save all changes**. Check out [Loading Data Using CData Sync- Create a Job](https://docs.uipath.com/process-mining/automation-cloud/latest/user-guide/create-a-job).

For **Purchase-to-Pay** use the following query:

```
REPLICATE [Accounting_documents] SELECT * FROM [Accounting_documents];
REPLICATE [Events] SELECT * FROM [Events];
REPLICATE [Goods_receipt] SELECT * FROM [Goods_receipt];
REPLICATE [Invoice_items] SELECT * FROM [Invoice_items];
REPLICATE [Invoices] SELECT * FROM [Invoices];
REPLICATE [Payments] SELECT * FROM [Payments];
REPLICATE [Purchase_order_items] SELECT * FROM [Purchase_order_items];
REPLICATE [Purchase_orders] SELECT * FROM [Purchase_orders];
REPLICATE [Purchase_requisitions] SELECT * FROM [Purchase_requisitions]
```
