SegOps AIDocs

CSV / Parquet Export

Export the full member list of any segment as a CSV or Parquet file for use in data warehouses, BI tools, or one-time audience uploads to platforms without a native connector.

Starting an Export#

Exports are asynchronous — you kick one off and poll for completion. Start via the dashboard or API:

Dashboard

Open a Segment, click the Export button, select the format (CSV or Parquet), and click Start Export.

API

bash
curl -X POST https://api.segops.ai/api/segments/7/export/ \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{ "format": "parquet" }'

# Response: 202 Accepted
# { "export_id": 14, "status": "pending" }

Polling for Completion#

bash
curl "https://api.segops.ai/api/segments/7/export/?export_id=14" \
  -H "Authorization: Bearer $JWT"

# When complete:
# {
#   "id": 14,
#   "status": "complete",
#   "format": "parquet",
#   "download_url": "/api/segments/exports/14/download/",
#   "expires_at": "2026-04-26T14:32:00Z"
# }

Poll every 2–5 seconds. Typical export time is under 30 seconds for segments with fewer than 1 million members.

Downloading the File#

bash
curl -L -o segment_members.parquet \
  "https://api.segops.ai/api/segments/exports/14/download/" \
  -H "Authorization: Bearer $JWT"

In production deployments, download_url resolves to a presigned Google Cloud Storage URL that expires after 1 hour. The file is stored in a private GCS bucket and served via a signed URL — no auth header required for the actual file download.

Warning
Download links expire. The expires_at field shows the expiration time. After expiry, trigger a new export.

File Formats#

FormatContentBest for
CSVComma-separated: user_id, computed_at columns. UTF-8 encoded.Direct upload to ad platforms, spreadsheet tools, simple ETL
ParquetColumnar binary format, Snappy-compressed.Data warehouses (BigQuery, Snowflake, Redshift), large-scale analytics, Spark/Pandas

Both formats include two columns: user_id (string) and computed_at (ISO 8601 timestamp).

Use Cases#

  • Data warehouse sync — load Parquet exports into BigQuery or Snowflake to join with your internal data for advanced analysis.
  • BI tools — use CSV exports in Looker, Tableau, or Google Sheets for reporting on segment sizes and trends.
  • One-time audience uploads— upload a CSV to an ad platform (Facebook Custom Audiences, Google Customer Match) that doesn't have a native connector.
  • Backup / compliance — periodic exports for data retention or audit requirements.