Documentation

Exporting datasets to files

How to export a provisioned DataNivra dataset to CSV, Excel, Parquet or JSON files directly from the agent — without routing data through DataNivra Cloud.

Privacy guarantee

DataNivra's core promise is that raw customer data rows never leave your network. File export honours that guarantee: the agent writes the export file directly to a directory you configure inside your network. The DataNivra control plane issues an authorisation token and receives a completion acknowledgement — it never sees the rows.

Your network:
  Agent ──(reads dataset)──▶ Engine ──(writes file)──▶ /exports/datanivra/
                                                              │
                                                              ▼
                                                     Your team downloads / S3 sync

DataNivra Cloud:
  Console ──(issues auth token)──▶ Agent heartbeat
           ◀──(job completed + row count only)──

Configure an export directory

Set the DATANIVRA_EXPORT_DIR environment variable (or mount the path) for the agent before starting it:

# docker run example
docker run -d \
  --name datanivra-agent \
  -e DATANIVRA_EXPORT_DIR=/exports/datanivra \
  -v /data/datanivra-exports:/exports/datanivra \
  ghcr.io/datanivra/agent:latest
# docker-compose example
services:
  datanivra-agent:
    image: ghcr.io/datanivra/agent:latest
    environment:
      DATANIVRA_EXPORT_DIR: /exports/datanivra
    volumes:
      - /data/datanivra-exports:/exports/datanivra

The directory must be writable by agent uid 10001.

Request a dataset with an export step

Use the CLI --export flag to request an export alongside the standard provision step:

datanivra test-data request \
  --profile-ref payments@2 \
  --scenario PAYMENTS_REGRESSION=500 \
  --purpose-ref SPRINT-42 \
  --export csv \
  -o json

Supported export formats: csv, xlsx, parquet, json.

The agent writes the file to $DATANIVRA_EXPORT_DIR/<dataset-id>/<table-name>.<ext> after the dataset job completes.

Download via console

The dataset detail page in the console shows an Export tab once a dataset has been successfully provisioned. Click Request export to trigger the agent to write the file (this calls the same API as the CLI). The page polls until the file is ready, then shows a Download link that opens a signed-URL to retrieve the file from your agent's export endpoint — the bytes travel agent → browser inside your network, not through DataNivra Cloud.

Network requirement: your browser must be able to reach the agent's export port (default 7443) directly, or through an internal load balancer. If your agent is in a private subnet, the Download link will not work from outside. Use the CLI or copy the file from the export directory instead.

Supported formats

FormatExtensionNotes
CSV.csvUTF-8, comma-separated, header row
Excel.xlsxOne sheet per table; max 1 M rows
Parquet.parquetSnappy compression, schema embedded
JSON Lines.jsonlOne JSON object per line

Troubleshooting

SymptomCauseFix
EXPORT_DIR_NOT_CONFIGUREDDATANIVRA_EXPORT_DIR not setAdd env var and restart agent
EXPORT_DIR_NOT_WRITABLEAgent uid 10001 cannot writechown -R 10001:10001 /exports/datanivra
Download link times outBrowser can't reach agentUse CLI or copy from export dir; check network path
File missing after jobExport step not requestedUse --export <format> flag or request via console

← All documentation