carto-import-export-data
Import geospatial files into the data warehouse via CARTO, export results back out, and prepare tilesets for fast map rendering.
How do I install this agent skill?
npx skills add https://github.com/cartodb/agent-skills --skill carto-import-export-dataIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides comprehensive instructions for importing, exporting, and preparing geospatial data using CARTO's CLI and MCP tools. It enables moving data between local storage, remote URLs, and various cloud data warehouses. A low-severity finding is noted regarding the attack surface for indirect prompt injection through the processing of untrusted external files.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
carto-import-export-data
Move data into the warehouse from local files / URLs, pull data out, and prepare tilesets for performant rendering of large geospatial datasets.
Access-path routing. With the CARTO MCP server attached (OAuth session), route interactive moves through
import_dataandexport_data(eachmethod: submit|status), and materialize tilesets withexecute_async_query. Fall back to thecarto import/carto sql jobCLI for scripted/bulk loads, headless pipelines, or when the server isn't attached — and note that over a token-authenticated MCP session the import/export/transfer tools are hidden (read/discovery subset only), so authoring moves there go via the CLI too.carto activity export(usage data → local disk) is CLI-only, no MCP equivalent. Format, size-limit, and destination-syntax guidance below applies on every path. Detection signals:carto-basics/references/access-paths.md.
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, or copy a table between connections.
- 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.
To query a file already in the warehouse, jump to carto-query-datawarehouse. To discover what's already there, carto-explore-datawarehouse.
Quick reference
MCP (OAuth session) — submit then poll:
import_data { method: "submit", source: {url|file}, connection, destination, overwrite? }
export_data { method: "submit", ... } → status with the returned job id
CLI fallback (scripted / headless / no server / token session):
# Import a local file (or --url for a remote source; --async to poll separately; --overwrite to replace)
carto import --file ./data.csv --connection carto_dw --destination project.dataset.table
What's in this skill
| Topic | Reference |
|---|---|
Importing — import_data / carto import flags, formats, size limits, async | references/imports.md |
| Tileset preparation for large maps | references/tilesets.md |
Exporting: warehouse-native unloads, export_data, activity export | references/exports.md |
Always-on guidance
--connection/connectionis the connection name (discover it withexplore_datamethod: list_connections, orcarto connections list --json), not the warehouse project ID.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).- 1 GB hard limit per file (CARTO-side, not a warehouse limit). For larger files, pre-stage to cloud storage and import from a presigned URL.
- Disable autoguessing (
--no-autoguessingon the CLI) when you've prepared a precise schema and don't want CARTO to second-guess types — especially numeric-looking columns that should stay string, like ZIP codes. - Imports/exports are async at the API level. MCP
import_data/export_datareturn a job id — poll withmethod: "status". The CLI polls to completion by default; pass--asyncto return immediately with a job id. - Tilesets follow import → materialize tileset table (
execute_async_queryorcarto sql job) → reference the tileset in a map. The tileset is created in the warehouse, not by the mover itself.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/cartodb/agent-skills/carto-import-export-data">View carto-import-export-data on skillZs</a>