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

# Automated exports

> Sync Hyperline reports and invoice exports to your database

Automated exports let you keep selected Hyperline datasets available in your own database for analysis, reporting, and finance operations.

Instead of downloading CSV files manually, you can create a **Data sync** that writes Hyperline data to a destination database on a recurring schedule. Each selected dataset is written to its own table.

<Note>
  In-app setup currently supports PostgreSQL destinations. Use a dedicated
  database, schema, or write user for Hyperline exports whenever possible.
</Note>

## Before you start

To create a data sync, make sure that:

* You have access to **Settings** in Hyperline
* Your destination PostgreSQL database can receive connections from Hyperline
* The database user can create tables and write rows
* The connection URL is available

If your database requires IP allowlisting, allow traffic from:

* `15.188.105.163`
* `15.188.215.105`
* `35.181.129.14`

You can also connect through an SSH tunnel when creating the PostgreSQL connection.

## Create a data sync

1. Go to **Settings** > **Data syncs**
2. Click **New sync**
3. Select an existing PostgreSQL connection, or choose **Create new connection**
4. Enter the connection name and database connection details
5. Select the sync status:
   * **Active**: run automatically on the configured schedule
   * **Paused**: keep the configuration without scheduled runs
6. Select the sync frequency:
   * **Every 12 hours**
   * **Every 24 hours**
7. Select the data to sync
8. Click **Save changes**

Hyperline validates the database connection before saving it. After the sync is created, it appears in the **Data syncs** list with its status, selected table count, frequency, and last sync date.

## Available data

You can sync invoice exports and Hyperline reports.

| Data                       | Destination table                             |
| -------------------------- | --------------------------------------------- |
| Invoices                   | `hyperline_invoices`                          |
| Invoice line items         | `hyperline_invoice_line_items`                |
| Aged balances              | `hyperline_report_aged_balances`              |
| All customers              | `hyperline_report_all_customers`              |
| All subscriptions          | `hyperline_report_all_subscriptions`          |
| Detailed revenue           | `hyperline_report_detailed_revenue`           |
| Draft invoices             | `hyperline_report_draft_invoices`             |
| Line by line revenue       | `hyperline_report_line_by_line_revenue`       |
| Live subscriptions         | `hyperline_report_live_subscriptions`         |
| Open invoices              | `hyperline_report_open_invoices`              |
| Outstanding invoices       | `hyperline_report_outstanding_invoices`       |
| Renewals                   | `hyperline_report_renewals`                   |
| Revenue per country        | `hyperline_report_revenue_per_country`        |
| Revenue per line item name | `hyperline_report_revenue_per_line_item_name` |
| Revenue per plan           | `hyperline_report_revenue_per_plan`           |
| Revenue per product        | `hyperline_report_revenue_per_product`        |

For more context on the report definitions, see [Reports](./reports).

## How syncs write data

Each selected dataset is refreshed as a snapshot. Hyperline creates the destination table if it does not exist, then replaces the table content during each successful sync.

If the table already exists, its schema must be compatible with the expected Hyperline columns. Extra columns can exist, but required columns must be present with compatible types.

Every exported table includes Hyperline metadata columns, such as:

| Column                           | Description                                      |
| -------------------------------- | ------------------------------------------------ |
| `_hyperline_source_id`           | Stable row identifier used by the sync           |
| `_hyperline_synced_at`           | Time when the row was written to the destination |
| `_hyperline_sync_run_id`         | Identifier of the sync run that wrote the row    |
| `_hyperline_report_generated_at` | Time when the report snapshot was generated      |
| `_hyperline_report_template`     | Source report template                           |
| `_hyperline_row_index`           | Row position in the generated report             |
| `_hyperline_row_hash`            | Hash of the source row content                   |

<Tip>
  Keep Hyperline-managed tables separate from your own transformed tables.
  Build downstream models or BI views from the `hyperline_*` tables instead of
  editing the synced tables directly.
</Tip>

## Run and monitor syncs

Scheduled syncs run only when the sync is **Active**. You can also click **Run now** from the sync list or sync detail page to start a manual run.

Open a sync to review **Run history**. Each run shows:

* Whether it was manual or scheduled
* Status: `pending`, `processing`, `done`, `partial`, or `error`
* Start time
* Number of selected tables
* Rows written
* Error message, when available

If a run fails, check that the destination database is reachable and that the user still has permission to create tables and write rows.

## Delete a data sync

Deleting a data sync stops future runs. Run history is kept for auditability, but Hyperline no longer updates the destination tables for that sync.

## Related pages

* [Reports](./reports)
* [Invoice exports](../invoices/exports)
* [Pull usage data with connectors](../usage/usage-data-with-connectors)
