Agent Skill · Carto
carto-import-export-data
Import geospatial files into the data warehouse via CARTO, export results back out, and prepare tilesets for fast map rendering.
Skill body
carto-import-export-data
Move data into the warehouse from local files / URLs (carto import), pull data out (carto activity export for usage data; warehouse-native unloads for everything else), and prepare tilesets for performant map rendering of large geospatial datasets.
When to use this skill
- The user has a CSV / GeoJSON / Shapefile / GeoParquet file and wants it queryable in the warehouse.
- The user wants to refresh an existing table from a remote URL.
- The user wants to render a 10M+-row spatial dataset on a map (needs tileset preparation).
- The user is bulk-exporting CARTO activity data to disk for offline analysis.
If the user just wants to query a file already in the warehouse, jump to carto-query-datawarehouse. If they want to discover what’s already there, carto-explore-datawarehouse.
Quick reference
# Import a local file
carto import --file ./data.csv \
--connection carto_dw \
--destination project.dataset.table
# Import from a URL
carto import --url https://example.com/data.geojson \
--connection carto_dw \
--destination my_project.demo.regions
# Async (return immediately, poll separately)
carto import --file ./big.parquet \
--connection carto_dw \
--destination my_project.demo.huge \
--async
# Overwrite existing table
carto import --file ./data.csv \
--connection carto_dw \
--destination my_project.demo.t \
--overwrite
What’s in this skill
| Topic | Reference |
|---|---|
carto import — flags, formats, size limits, async |
references/imports.md |
| Tileset preparation for large maps | references/tilesets.md |
Exporting data: warehouse-native unloads vs activity export |
references/exports.md |
Always-on guidance
--connectionis the connection name (fromconnections list), not the warehouse project ID. If you only know the project, runcarto connections list --jsonfirst to find the matching connection.--destinationis the fully-qualified target name in the warehouse’s syntax:project.dataset.table(BigQuery),DATABASE.SCHEMA.TABLE(Snowflake),schema.table(Postgres/Redshift),catalog.schema.table(Databricks),SCHEMA.TABLE(Oracle).- 1GB hard limit per file. For larger files, split or pre-stage to cloud storage and use
--urlto a presigned URL. --no-autoguessingskips column type detection — use it when you’ve prepared a precise schema and don’t want CARTO to second-guess types (especially for columns that look numeric but should stay string, like ZIP codes).- Imports are async at the API level. The CLI defaults to polling-to-completion; pass
--asyncto return immediately. The CLI prints a job ID in async mode that you can use to check progress. - For tilesets, the workflow is import → SQL job to materialize a tileset table → reference the tileset in a map. The tileset itself is created in the warehouse, not by the CLI.
Skill frontmatter
license: MIT