# import

Import a geospatial file into your data warehouse from a local file or URL. Waits for completion by default.

**Supported formats:** CSV, GeoJSON, GeoPackage, GeoParquet, KML, KMZ, Shapefile (zip).\
**Size limit:** 1 GB per file.\
**Supported warehouses:** CARTO DW, BigQuery, Snowflake, PostgreSQL, Redshift.

```bash
carto import --file <path> --connection <name> --destination <table>
carto import --url <url> --connection <name> --destination <table>
carto import status <jobId>                     # Fetch status of an async import job
```

## Options

| Option                | Description                                                              |
| --------------------- | ------------------------------------------------------------------------ |
| `--file <path>`       | Local file to upload (mutually exclusive with `--url`).                  |
| `--url <url>`         | Remote file URL to import (mutually exclusive with `--file`).            |
| `--connection <name>` | (Required) Connection name.                                              |
| `--destination <fqn>` | (Required) Fully qualified table name.                                   |
| `--overwrite`         | Overwrite an existing table (default: false).                            |
| `--no-autoguessing`   | Disable automatic column type detection (default: autoguessing enabled). |
| `--async`             | Return immediately with the job ID instead of polling to completion.     |

## Examples

```bash
# Import local CSV
carto import --file ./data.csv --connection carto_dw --destination project.dataset.my_table

# Import from URL with overwrite
carto import \
  --url https://example.com/data.geojson \
  --connection carto_dw \
  --destination project.dataset.table \
  --overwrite

# Kick off async, then poll status separately
carto import --file ./big.csv --connection carto_dw --destination my.table --async
carto import status <jobId>

# JSON output (for scripts)
carto import --file ./data.geojson --connection carto_dw --destination project.dataset.table --json
```

## CSV auto-detection

For CSV files, CARTO automatically detects geometry columns or builds geometries from lat/lon columns:

* **Geometry columns:** `geom`, `Geom`, `geometry`, `the_geom`, `wkt`, `wkb`.
* **Latitude columns:** `latitude`, `lat`, `Latitude`.
* **Longitude columns:** `longitude`, `lon`, `Lon`, `Longitude`, `lng`, `Lng`.

Disable with `--no-autoguessing` if you need full control over the schema.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.carto.com/carto-for-agents/cli/command-reference/imports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
