Appearance
Data export
Also known as
- data export API
- export dataset
- CSV export
- JSON Lines
- JSONL
- data warehouse
- data lake
- ETL
- incremental load
- watermark
Data export API streams a whole dataset as CSV or JSON Lines, for loading into a data warehouse, a data lake or a BI tool. You can download a file here, or copy the address and call it from a script with an API key. Incremental datasets let each load fetch only the rows that changed since the last one.
Download a dataset
- Open AnalyticsData export.
- In Dataset, choose the data. Each entry says Incremental or Full export only.
- Choose the Format: CSV (header = column keys) or JSON Lines (one record per line).
- In Columns, pick the columns you need (Empty: every column.).
- For an incremental dataset, set Changed since to get only rows changed at or after that time. Other datasets show This dataset has no change timestamp.
- Check the address shown after GET and select Download.
Load a warehouse with the API
- Ask an administrator for an API key with the Export datasets permission plus read access to the datasets, in API keys.
- Build the address on this page and copy it, or the
curlline under Using the API. - Call it with the header
Authorization: Bearer erp_…. The response streams every row (no paging). - For the next load, pass the response header
X-Export-Watermarkasupdated_since. The window overlaps by one minute, so update rows by their id rather than inserting them again. - To filter, add
filter[column]=valueor an operator such asfilter[column][gte]=value. - To be told when a dataset changes, subscribe a webhook to the event
analytics.dataset.changedin Webhooks. The check runs every 15 minutes and the event carries an export address for the changed rows.
Money and decimal values are exported as text, dates as YYYY-MM-DD and times in RFC 3339. Incremental datasets get a trailing row_changed_at column and are sorted by it.
Differences by role
- The page and the API need Permission:
analytics.export.useplus the permission of each dataset; only datasets you may read are listed. - Finance users have the export permission in the demo workspace.
Related
- Reports: the Datasets tab
- API keys
- Webhooks
- Imports and exports
- Reports catalogue
