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

# Create an export

> Configure a dataset, cadence, window, and columns, and write Parquet files to one of your S3 destinations.

## Overview

An **export** writes one [dataset](/data-warehouse/overview#datasets) to one of your [destinations](/data-warehouse/s3-destination) as Parquet files, on a schedule you choose. This guide covers the create flow that's common to every dataset; each dataset page documents the columns and any dataset-specific settings.

## Prerequisites

* An S3 destination configured. See [Set up an S3 destination](/data-warehouse/s3-destination).
* A space administrator role in Cometly.

## Create the export

<Steps>
  <Step title="Open Data Exports">
    In the dashboard, go to **Integrations → Data Exports** and select **Create export**.
  </Step>

  <Step title="Name the export">
    Give it a recognizable name, for example "Touchpoints to warehouse".
  </Step>

  <Step title="Choose a destination">
    Select the destination to write to. Files land in that destination's bucket.
  </Step>

  <Step title="Set a path prefix (optional)">
    Optionally set a path prefix (for example `cometly/`). Files are written under this path within
    the bucket.
  </Step>

  <Step title="Pick a dataset">
    Choose the dataset to export. Each dataset has its own columns and quirks — see the
    [dataset reference](/data-warehouse/overview#datasets).
  </Step>

  <Step title="Choose the columns">
    Pick which columns the Parquet files carry from the dataset's catalog. Locked columns are always
    included; the rest are optional. Your selection is **frozen at creation** (see below).
  </Step>

  <Step title="Set the cadence and window">
    Choose how often the export runs and how much data each run covers:

    * **One-time** — runs once. Pick an absolute **start and end date**.
    * **Daily** — runs once a day at a **scheduled hour** you choose. Pick a **trailing window**
      preset (up to 90 days).
    * **Hourly** — runs every hour. Pick a **trailing window** preset (up to 14 days; up to 7 days
      for ad-analytics datasets).

    See [Cadence and windows](/data-warehouse/overview#cadence-and-windows) for how trailing windows
    behave.
  </Step>

  <Step title="Configure dataset-specific settings">
    Some datasets ask for more at creation — the [Attributed conversions](/data-warehouse/datasets/attributed-conversions)
    dataset takes an attribution model, window, type, and optional source filter; the
    [Contacts](/data-warehouse/datasets/contacts) dataset asks how custom-field columns should be
    named. Most datasets need only a column selection.
  </Step>

  <Step title="Create">
    Select **Create export**. For recurring cadences the first run is scheduled; for one-time it runs
    right away. Cometly writes the data to your destination and records each run in the export's run
    history.
  </Step>
</Steps>

<Note>
  Each export run is recorded with its status and timing. Open an export to view its run history.
</Note>

## Exports are immutable

Once created, an export's **name is the only thing you can change**. To alter the cadence, window,
destination, dataset, or columns, delete the export and create a new one. This keeps every run's
output faithful to the configuration that produced it — a run's columns and shape never drift
underneath your pipeline.

## File layout

Files are written to your bucket under a Hive-style partitioned path:

```
<prefix>/<dataset>/space_id=<id>/exported_date=<YYYY-MM-DD>/run_id=<ULID>/
  ├── <parquet files>
  └── _SUCCESS
```

* **`<dataset>`** is the dataset's path segment — `touchpoints`, `raw_conversions`, `raw_hits`,
  `attributed_conversions`, `contacts`, `companies`, or `<channel>_ad_analytics` (for example
  `facebook_ad_analytics`). Each dataset page lists its segment.
* **`exported_date`** is the date the export ran (not the event date) and is sortable, so your
  pipeline can always find the most recent export.
* **`run_id`** makes every run unique, so runs never overwrite each other and retries are safe.
* **`_SUCCESS`** is written last. Only ingest a run folder once its `_SUCCESS` marker is present, so
  you never read a partially written run.

## Loading the data

Point your ingestion tooling — Snowflake, BigQuery, Databricks Auto Loader, Athena, and others — at
the `…/<dataset>/space_id=<id>/` prefix to pick up new partitions automatically.

<Note>
  Each recurring run re-exports the **entire window**, not just new rows — so the most recent
  `exported_date` is the current snapshot of that window. Deduplicate on a stable key (such as the
  row's id, or the id plus metric date for ad analytics) when loading.
</Note>
