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

# Data exports

> Export invoices, customers, subscriptions, credits, and usage to your data warehouse on a schedule

Data exports copy Orvlin's records into your own warehouse, so finance and analytics teams can work with billing data next to the rest of their data.

## What is exported

Invoices, invoice line items, customers, subscriptions, credits, and usage events are exported every 10 minutes, or on demand with **Export now**.

## Destinations

| Destination | What you provide |
| - | - |
| Amazon S3 (or any S3-compatible store) | A bucket, a region, and a key with `s3:PutObject`. Optional prefix and endpoint. |
| BigQuery | A project, a dataset, and a service account with BigQuery Data Editor. |
| Snowflake | An account, a user with a registered RSA key, a warehouse, a database, and a schema. |

Every exported row has `id`, `account_id`, `exported_at`, and `data` (the full record). Exports are append-only, so take the latest row per `id`:

```sql theme={null}
-- BigQuery
SELECT * EXCEPT (rn) FROM (
  SELECT *, ROW_NUMBER() OVER (PARTITION BY id ORDER BY exported_at DESC) AS rn
  FROM billing.orvlin_invoices
) WHERE rn = 1;

-- Snowflake
SELECT * FROM ORVLIN_INVOICES
QUALIFY ROW_NUMBER() OVER (PARTITION BY ID ORDER BY EXPORTED_AT DESC) = 1;
```

Each run exports up to 5,000 rows per dataset and continues on the next run, so the first export of a large account takes several runs. Check progress on the card, or at `GET /v1/integrations/warehouse/status`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.