> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rwsintegration.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract from RWS Connect

> Learn how to create an integration that extracts data from an RWS Connect table and delivers it as a CSV file

This guide walks you through creating a working integration that extracts employee data from an [RWS Connect](/en/core-concepts/rws-connect) table and delivers it in CSV format to an SFTP server. By the end, you'll know how to query Connect tables, including keeping only the latest record per employee, and use the result like any other API source.

## What you'll build

You'll create an integration that:

1. **Extracts** the current employee snapshot from an RWS Connect table
2. **Transforms** the data to a simpler format
3. **Loads** the results to an SFTP server in CSV format

Time required: approximately 5 minutes.

## Prerequisites

* Access to an RWS Integration Workspace
* An RWS Connect table already provisioned, and the `x-api-key` provided by RWS (to request one, see [RWS Connect](/en/core-concepts/rws-connect))
* A SFTP server

The examples use a tenant `acme` with a table `employees`. Replace them with your own database and table names.

## Step 1: Create the source Connection

The RWS Connect API uses a standard [Simple connection](/en/features/connections/api#simple).

1. In the sidebar, click **Connections**
2. Click **New Connection**
3. Configure the connection:

| Field          | Value                                |
| -------------- | ------------------------------------ |
| Name           | `RWS Connect`                        |
| Type           | `API`                                |
| URL            | `https://connect.rwsintegration.com` |
| Base Path      | `/`                                  |
| Authentication | `Simple`                             |
| Headers        | `x-api-key`: the key provided by RWS |

4. Click **Save**

## Step 2: Create the destination Connection

Now create a Connection for your SFTP server.

1. Click **New Connection**
2. Configure the connection:

| Field           | Value              |
| --------------- | ------------------ |
| Name            | `SFTP Connection`  |
| Type            | `SFTP`             |
| URL             | `sftp.example.com` |
| Base Path       | `/uploads`         |
| Port            | `22`               |
| Username        | `username`         |
| SSH Private Key | `private_key`      |

3. Click **Save**

## Step 3: Create the Integration

With both Connections ready, create the Integration that moves data between them.

1. In the sidebar, click **Integrations**
2. Click **New Integration**

### General settings

Configure the basic integration properties:

| Field       | Value                                          |
| ----------- | ---------------------------------------------- |
| Name        | `Employees from RWS Connect`                   |
| Version     | `1.0.0`                                        |
| Type        | `Full`                                         |
| Environment | `Staging`                                      |
| Schedule    | Daily, at a time of your choice (e.g. `09:00`) |

### Extract phase

The Extract phase queries the RWS Connect API.

1. Expand the **Extract** section
2. Configure these fields:

| Field      | Value         |
| ---------- | ------------- |
| Connection | `RWS Connect` |
| Method     | `GET`         |
| Path       | `/`           |

3. Add the **Query Params**:

| Parameter                                | Value       |
| ---------------------------------------- | ----------- |
| `database`                               | `acme`      |
| `table`                                  | `employees` |
| `filter[over_employee_id][extracted_at]` | `first`     |

The `filter[over_employee_id][extracted_at]=first` parameter keeps only the **newest record per employee**. Connect tables preserve a snapshot per run, and this filter turns the history into the current state. See [Querying the RWS Connect API](/en/features/extract/connect-api#latest-record-per-key) for details.

4. Set the **Datapoint Path in Response** to `Items`

5. Set the **Pagination**:

| Field                  | Value          |
| ---------------------- | -------------- |
| Pagination Type        | `Simple`       |
| Page size parameter    | `page[size]`   |
| Page size value        | `100`          |
| Initial page parameter | `page[number]` |
| Initial page value     | `1`            |
| Pagination end type    | `Object`       |

6. Check the **Extract Preview** panel on the right side. It should show:

* Status: `200 OK`
* A single employee record (the Datapoint) like this:

```json theme={null}
{
  "employee_id": "1042",
  "name": "Ana Souza",
  "department": "Sales",
  "city": "Manaus",
  "extracted_at": "2026-07-28 06:00:12.000"
}
```

### Transform phase

The Transform phase maps source fields to your destination format. For this guide, create a simple mapping with three fields.

1. Expand the **Transform** section
2. Click **Add Transformation** and configure:

| Type   | To           | From          |
| ------ | ------------ | ------------- |
| Simple | `employeeId` | `employee_id` |
| Simple | `fullName`   | `name`        |
| Simple | `department` | `department`  |

3. Check the **Transform Preview** panel. It should display:

```json theme={null}
{
  "employeeId": "1042",
  "fullName": "Ana Souza",
  "department": "Sales"
}
```

### Load phase

The Load phase sends transformed data to your destination.

1. Expand the **Load** section
2. Configure these fields:

| Field      | Value             |
| ---------- | ----------------- |
| Connection | `SFTP Connection` |
| Path       | `/guides`         |
| File name  | `employees.csv`   |

## Step 4: Deploy the Integration

1. Toggle **Deployment** to enabled
2. Click **Create Integration**

The integration will now run automatically every day at the time you chose.

## Step 5: Run it now

You don't need to wait for the schedule. Trigger the first run manually:

1. Open your integration from the **Integrations** list
2. Click **Run now**, next to the **Save** button
3. Confirm in the dialog, and a **Run started** message appears

## Step 6: Verify the results

Go to your SFTP server and check if the file `employees.csv` was created in the `/guides` directory.

You should see a file with this structure:

```csv theme={null}
employeeId,fullName,department
1042,Ana Souza,Sales
1043,Bruno Lima,Finance
1044,Carla Mendes,Operations
```

Congratulations, you've built an integration on top of an RWS Connect table!

## What you learned

* **RWS Connect tables** are queried through a standard Simple connection, with no special connector needed
* **`database` and `table`** identify your data: the tenant name from onboarding and the table agreed when the connector was requested
* **The `over_` filter** turns snapshot history into the current state, keeping the newest record per key
* **`Items` and Simple pagination** (`page[size]` / `page[number]`) plug straight into the platform's extract configuration

## Need the data live?

This guide reads from Connect **tables** — your data as of the last refresh. When an integration needs your system's answer *right now* (monitoring and audits, for example), use [RWS Connect Live](/en/guides/rws-connect-live): the same api key, reading your system in real time.

## Next steps

<CardGroup cols={2}>
  <Card title="Querying the RWS Connect API" icon="magnifying-glass" href="/en/features/extract/connect-api">
    Filters, aggregations, sorting and everything else the API supports
  </Card>

  <Card title="Dynamic Parameters" icon="brackets-curly" href="/en/features/extract/dynamic-parameters">
    Filter by dynamic dates like "yesterday"
  </Card>

  <Card title="Business Rules" icon="code" href="/en/features/business-rules/overview">
    Transform data with JavaScript
  </Card>

  <Card title="Scheduling" icon="clock" href="/en/features/extract/scheduling">
    Schedule your integrations to run automatically
  </Card>
</CardGroup>
