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

# Export project data in bulk

> Configure Amazon S3 access and export Weave project data as Parquet through the API.

W\&B Weave bulk export writes a project's calls, object versions, and feedback to Amazon S3 as Parquet files. Deployment administrators configure storage access, and authorized users start exports through the API.

This workflow applies to [Dedicated Cloud and Self-Managed deployments](https://docs.coreweave.com/products/wandb/weave/guides/platform.md) configured for Amazon S3 export. Ask your deployment administrator to confirm that your server release includes bulk export before you configure it.

> [!NOTE]
>
> Bulk export supports **Amazon S3 only**. Google Cloud Storage, Azure Blob Storage, and other S3-compatible destinations aren't supported. This limitation applies to bulk export; bring your own bucket (BYOB) features have separate storage-provider support.

## Prerequisites

To configure bulk export, a deployment administrator must have the following:

* A Weave Trace server with bulk export support and connectivity to ClickHouse and Redis.
* An existing Amazon S3 bucket and an optional prefix for export files.
* An AWS administrator who can configure AWS Identity and Access Management (IAM) roles and storage permissions.
* A ClickHouse identity that can assume the customer export role.
* A Weave Trace AWS identity that can write and read export metadata.

To start an export and retrieve its files, you must have the following:

* Your deployment's trace API base URL and a Forge API key.
* `curl` for the API examples and the AWS CLI for file downloads.

For an organization-owned project, the API caller must have project write access and be an administrator of the owning organization. Project write access alone is insufficient. Personal projects require project write access. Start and status requests both check your current permissions.

## Configure Amazon S3 storage

The deployment administrator configures one destination for exports. Individual API requests don't select a bucket or prefix.

### Select a bucket and prefix

Use an S3 URI in the form `s3://BUCKET_NAME/PREFIX`. Replace `BUCKET_NAME` with your bucket name and `PREFIX` with an optional prefix. For example:

```text theme={"system"}
s3://example-export-bucket/backups/weave
```

An omitted prefix or `/` uses the bucket root. Weave normalizes leading, trailing, and repeated slashes. Don't include credentials, query parameters, fragments, wildcard characters (`*`, `?`, `{`, or `}`), or `.` and `..` path segments.

Export files use the `exports/` directory beneath the configured prefix. Review bucket lifecycle rules, encryption, and network restrictions with your AWS administrator.

### Configure the ClickHouse role

ClickHouse and Weave Trace use separate AWS identities. ClickHouse writes the Parquet files. Weave Trace writes the final success manifest and reads it to report the status of completed jobs.

To create the customer IAM role that ClickHouse assumes:

1. Find the Amazon Resource Name (ARN) of the AWS principal that ClickHouse uses. This is the principal that your customer IAM role must trust, and it must be able to assume that role. It isn't the customer role's ARN that you configure in Weave.

   * **ClickHouse Cloud**: Open the service's **Settings**, find **Network security information**, and copy **Service role ID (IAM)**.
   * **Self-hosted ClickHouse**: Identify the AWS principal used by the ClickHouse server. The ClickHouse Cloud console steps don't apply to self-hosted servers.

2. Create a customer IAM role with a trust policy for the ClickHouse principal. Replace `CLICKHOUSE_PRINCIPAL_ARN` with that principal's ARN:

   ```json title="clickhouse-trust.json" theme={"system"}
   {
     "Version": "2012-10-17",
     "Statement": [{
       "Effect": "Allow",
       "Principal": {"AWS": "CLICKHOUSE_PRINCIPAL_ARN"},
       "Action": "sts:AssumeRole"
     }]
   }
   ```

3. Configure role-based access for your ClickHouse service by following [Accessing S3 data securely](https://clickhouse.com/docs/products/cloud/guides/data-sources/accessing-s3-data-securely). Confirm the trust requirements for your account arrangement. Weave supplies the customer role ARN to the query.

4. Attach an S3 permissions policy to the customer role. Replace `BUCKET_NAME` with your bucket name and `PREFIX` with your configured prefix. If you use the bucket root, remove `PREFIX/` from both the object resource and the prefix conditions:

   ```json title="clickhouse-export-policy.json" theme={"system"}
   {
     "Version": "2012-10-17",
     "Statement": [
       {
         "Effect": "Allow",
         "Action": [
           "s3:PutObject",
           "s3:GetObject",
           "s3:AbortMultipartUpload",
           "s3:ListMultipartUploadParts"
         ],
         "Resource": "arn:aws:s3:::BUCKET_NAME/PREFIX/exports/*"
       },
       {
         "Effect": "Allow",
         "Action": "s3:ListBucket",
         "Resource": "arn:aws:s3:::BUCKET_NAME",
         "Condition": {
           "StringLike": {"s3:prefix": ["PREFIX/exports/", "PREFIX/exports/*"]}
         }
       },
       {
         "Effect": "Allow",
         "Action": "s3:GetBucketLocation",
         "Resource": "arn:aws:s3:::BUCKET_NAME"
       }
     ]
   }
   ```

### Configure Weave Trace access

Grant Weave Trace's existing AWS role `s3:PutObject` and `s3:GetObject` on the export objects. Grant `s3:ListBucket` restricted to the export prefix. Prefix listing helps distinguish a missing manifest from denied access.

Use the deployment's existing AWS software development kit (SDK) credential source, such as an IAM role for a Kubernetes ServiceAccount. Preserve existing file-storage permissions. The Kubernetes ServiceAccount name alone doesn't identify the AWS role.

For cross-account buckets, configure the required bucket and identity policies. If you use AWS Key Management Service (AWS KMS) encryption, authorize both identities in the key policy and grant each one `kms:GenerateDataKey` and `kms:Decrypt` on the key. If Weave Trace needs the key for its metadata writes, set `WF_FILE_STORAGE_AWS_KMS_KEY`. If its S3 client needs a region override, set `WF_FILE_STORAGE_AWS_REGION`.

Before enabling exports, verify that ClickHouse can write a representative Parquet file and that Weave Trace can write and read export metadata.

### Configure the deployment

Set the export environment variables on Weave Trace through your deployment's configuration mechanism. Replace `BUCKET_NAME`, `PREFIX`, and `CUSTOMER_EXPORT_ROLE_ARN` with your values:

```text theme={"system"}
WF_EXPORT_STORAGE_URI=s3://[BUCKET_NAME]/[PREFIX]
WF_EXPORT_AWS_ROLE_ARN=[CUSTOMER_EXPORT_ROLE_ARN]
```

`WF_EXPORT_AWS_ROLE_ARN` identifies the customer role that ClickHouse assumes. Both settings are required to start exports. Keep the file-storage setting `WF_FILE_STORAGE_URI` unchanged. Export storage has no automatic fallback to the deployment's default bucket.

To detect export queries that are still running, Weave Trace checks the ClickHouse cluster named in `WF_CLICKHOUSE_REPLICATED_CLUSTER` when set, or the cluster named `default` otherwise. The selected cluster must include every server that can execute export queries. If the cluster is missing or Weave Trace can't see its queries, start requests fail with HTTP `503`.

Apply the configuration through your normal deployment process. To stop accepting exports, remove the export role setting. Retain the storage URI and permissions needed to look up completed jobs.

## Start an export

Set your trace API base URL and credentials. Replace `INSTANCE_HOST` with your deployment hostname and `API_KEY` with your API key:

```bash theme={"system"}
export TRACE_BASE_URL='https://INSTANCE_HOST/traces'
export WANDB_API_KEY='API_KEY'
```

Confirm the base URL with your deployment administrator. If the supplied base URL already includes `/traces`, don't append it again.

To export all supported datasets, replace `ENTITY` and `PROJECT` with the entity and project names used in your project URL:

```bash theme={"system"}
curl --fail-with-body --silent --show-error \
  --user "api:${WANDB_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{"targets":["calls","objects","feedback"]}' \
  "${TRACE_BASE_URL}/v1/entities/ENTITY/projects/PROJECT:export"
```

Use the URL names, including the entity slug, rather than display names. URL-encode path values when necessary.

A successful request returns HTTP `202` with a job ID. The following example shows the response:

```json title="Example output" theme={"system"}
{
  "name": "entities/acme/projects/demo/exports/642d768b-043f-4b24-ae99-1383c853c42d",
  "job_id": "642d768b-043f-4b24-ae99-1383c853c42d",
  "created_at": "2026-11-02T12:00:00Z"
}
```

Save the job ID to check status. The API has no list operation or idempotency key. If you lose the start response, don't automatically repeat the request.

Choose one or more distinct targets in `targets`:

| Target | Export contents |
| - | - |
| `calls` | Physical rows for calls that haven't been soft-deleted. Legacy storage can contain separate start and end rows. |
| `objects` | The newest visible row for each object version. |
| `feedback` | The project's feedback rows. |

## Check export status

To check a known job, replace `ENTITY`, `PROJECT`, and `JOB_ID` with the scope and job ID from the start request:

```bash theme={"system"}
curl --fail-with-body --silent --show-error \
  --user "api:${WANDB_API_KEY}" \
  "${TRACE_BASE_URL}/v1/entities/ENTITY/projects/PROJECT/exports/JOB_ID"
```

Poll at a moderate interval, such as every 5 seconds, until the state is terminal:

| State | Meaning |
| - | - |
| `in_progress` | The workflow is preparing, counting, writing, or finalizing. |
| `succeeded` | All selected datasets completed, and the server published the final success manifest. |
| `failed` | The job failed. Inspect `failure.code` and `failure.message`. |

A successful calls-only job has a response similar to this example:

```json title="Example output" theme={"system"}
{
  "name": "entities/acme/projects/demo/exports/642d768b-043f-4b24-ae99-1383c853c42d",
  "job_id": "642d768b-043f-4b24-ae99-1383c853c42d",
  "created_at": "2026-11-02T12:00:00Z",
  "updated_at": "2026-11-02T12:02:00Z",
  "state": "succeeded",
  "artifacts": [{
    "target": "calls",
    "uri": "s3://example-export-bucket/backups/weave/exports/encoded-project-id/642d768b-043f-4b24-ae99-1383c853c42d/calls/data.parquet",
    "expected_rows": 1000,
    "written_rows": 1000
  }],
  "failure": null
}
```

## Retrieve export files

Use the artifact URIs returned by the status API. The storage path includes an encoded internal project identifier, which can differ from the project name.

For a job that selects all datasets, the output layout is:

```text theme={"system"}
s3://example-export-bucket/backups/weave/exports/encoded-project-id/job-uuid/
├── calls/data.parquet
├── objects/data.parquet
├── feedback/data.parquet
└── manifest.json
```

Only selected datasets have output paths. An empty dataset might have no Parquet object. Check its returned row counts.

To download a returned artifact with your own AWS credentials, replace `ARTIFACT_URI` with its `uri` value:

```bash theme={"system"}
aws s3 cp 'ARTIFACT_URI' .
```

The API returns S3 URIs without signed download links. Your AWS identity must have read access to the exported objects. Weights & Biases project permission doesn't grant bucket access.

## Limitations

Only one export workflow runs at a time for the configured ClickHouse service and database. Another start request receives HTTP `409`. Requests aren't queued.

The server counts all selected datasets before writing Parquet. If a dataset exceeds the row cap, the job fails before any dataset writes begin. Execution stops on the first failure.

Deployment administrators can configure these query limits:

| Environment variable | Default | Scope |
| - | - | - |
| `WF_EXPORT_MAX_ROWS` | `5000000` | Row cap per selected dataset. |
| `WF_EXPORT_MAX_EXECUTION_SECONDS` | `1800` | Execution limit in seconds per ClickHouse query. |
| `WF_EXPORT_MAX_THREADS` | `2` | Processing threads per query on each server. |
| `WF_EXPORT_MAX_MEMORY_BYTES` | `4294967296` | Memory limit in bytes (4 GiB) per query on each server. |

Values must be positive integers. These limits don't reserve CPU or memory. A dataset below the row cap can still exceed the memory budget.

Counts and writes use separate queries. Exports don't provide a transactionally consistent snapshot across datasets or concurrent writes. Physical row counts can differ from logical call counts in the UI.

Bulk export doesn't copy referenced media bytes or recursively export referenced table contents. To use externally stored media in Weave, see [Reference media in your own bucket (BYOB) using Weave Op](https://docs.coreweave.com/products/wandb/weave/guides/tracking/byob-references.md). The export isn't a full deployment backup or a supported restore format.

## Troubleshoot an export

Errors include a diagnostic message. Export service errors also include a machine-readable `detail.code`:

| Result | Action |
| - | - |
| HTTP `401` or `403` | Check API credentials, project write access, and organization administrator status. |
| HTTP `404`, `EXPORT_NOT_FOUND` | Confirm the project and saved job ID. Missing records don't prove an export never ran. |
| HTTP `409`, `EXPORT_ALREADY_RUNNING` | Wait for the existing export, or an export query still running in ClickHouse, to stop. |
| HTTP `422` | Correct the request body, target selection, or job ID format. |
| HTTP `501`, `EXPORT_PROVIDER_NOT_IMPLEMENTED` | Ask the deployment administrator to set an `s3://` storage URI. Google Cloud Storage and Azure Blob Storage URIs aren't implemented. |
| HTTP `503` | Ask the deployment administrator to inspect storage settings, IAM permissions, Redis connectivity, and ClickHouse query visibility. |
| Failed job with `EXPORT_ROW_LIMIT_EXCEEDED` | Review the row cap and query resource budgets with the deployment administrator. |
| Failed job with `EXPORT_WORKER_CRASHED` | The export worker stopped before the job finished. Start a new export. |

A worker restart doesn't resume an export. An export query still running in ClickHouse blocks another export until it stops. An HTTP `503` from a status request means the server couldn't check the job's dependencies, not that the job failed.

Failed jobs can leave partial files. The API doesn't return them as successful artifacts, and it doesn't automatically delete them. The API has no cancellation or automatic retry operation.

The server writes the final manifest only after all selected datasets succeed. Completed jobs can be recovered from that manifest if Redis job records are unavailable. Failed and intermediate history can be lost with Redis state.

Keep the storage bucket and prefix stable while jobs run and while you need historical lookup. Use bucket lifecycle policies to manage file retention.
