Skip to main content
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 configured for Amazon S3 export. Ask your deployment administrator to confirm that your server release includes bulk export before you configure it.
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:
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:
    clickhouse-trust.json
  3. Configure role-based access for your ClickHouse service by following 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:
    clickhouse-export-policy.json

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:
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:
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:
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:
Example output
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:

Check export status

To check a known job, replace ENTITY, PROJECT, and JOB_ID with the scope and job ID from the start request:
Poll at a moderate interval, such as every 5 seconds, until the state is terminal: A successful calls-only job has a response similar to this example:
Example output

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:
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:
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: 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. 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: 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.
Last modified on November 30, 2026