export

Export a warehouse table to a file. Returns a download URL (24 h expiry) or writes to cloud storage.

Formats: geoparquet, geojson, shapefile, csv, geopackage, kml, kmz, tab.

carto export --connection <name> --source <table> --format <fmt>
carto export status <jobId>                     # Fetch status of an async export job

Options

Option
Description

--connection <name>

(Required) Connection name.

--source <fqn>

(Required) Source table name.

--format <fmt>

(Required) Output format.

--select <cols>

Comma-separated columns to project (default: all).

--where <predicate>

Warehouse-native SQL predicate (no leading WHERE).

--limit <n>

Max rows to export.

--dest-url <url>

Direct cloud destination (gs://, s3://).

--async

Return job ID immediately without waiting.

Examples

# Export as GeoParquet (waits, prints download URL)
carto export --connection carto_dw --source project.dataset.my_table --format geoparquet

# Export selected columns with a WHERE predicate and a row limit
carto export \
  --connection carto_dw \
  --source project.dataset.my_table \
  --format csv \
  --select name,lon,lat \
  --where "year = 2025" \
  --limit 10000

# Export directly to cloud storage
carto export \
  --connection carto_dw \
  --source project.dataset.my_table \
  --format geojson \
  --dest-url gs://my-bucket/exports/data.geojson

# Kick off async, then poll status separately
carto export --connection carto_dw --source project.dataset.big --format csv --async
carto export status <jobId>

Last updated

Was this helpful?