Skip to content
Back to skills

420 Import Data 79b8d24e

ASecurity

Import data from CSV, JSON, or JSONL files into an existing Weaviate collection with automatic type conversion and column mapping.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
content-marketingbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 420-import_data_79b8d24e --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 420 Import Data 79b8d24e?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 420 Import Data 79b8d24e
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-420-import-data-79b8d24e/badge)](https://www.skillsdirectory.com/skills/tools-only-420-import-data-79b8d24e)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Import Data

Import data from CSV, JSON, or JSONL files into an existing Weaviate collection with automatic type conversion and column mapping.

## Usage

```bash
uv run scripts/import.py "data.csv" --collection "CollectionName" [--mapping '{}'] [--tenant "name"] [--batch-size 100] [--json]
```

## Parameters

| Parameter | Flag | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `file` | — | Yes (positional) | — | Path to CSV, JSON, or JSONL file |
| `--collection` | `-c` | Yes | — | Target collection name (must already exist) |
| `--mapping` | `-m` | No | — | JSON object mapping file columns/keys to collection properties |
| `--tenant` | `-t` | No | — | Tenant name for multi-tenant collections (required if collection has multi-tenancy enabled) |
| `--batch-size` | `-b` | No | `100` | Number of objects per batch |
| `--json` | — | No | `false` | Output in JSON format |

## File Formats

### CSV

- First row used as header (auto-detected via `csv.Sniffer`)
- Delimiter and quoting auto-detected
- Falls back to generated column names if no header detected
- Columns mapped to collection properties by name (case-sensitive)

### JSON

- Must be an array of objects: `[{"prop1": "value1"}, {"prop2": "value2"}]`
- Keys must match collection property names

### JSONL

- One JSON object per line
- Each object's keys must match collection property names

## Automatic Type Conversion

The import script automatically converts string values:

- `"true"` / `"false"` → boolean
- Digit strings → int
- Decimal strings → float
- `None` and empty strings are skipped

## Output

- **Default**: Import summary with total, imported, and failed counts (plus sample errors if any)
- **JSON**: Structured import stats

Returns exit code `1` if any imports fail.

## Examples

Import from CSV:

```bash
uv run scripts/import.py data.csv --collection "Articles"
```

Import with column mapping:

```bash
uv run scripts/import.py data.csv --collection "Articles" \
  --mapping '{"title_col": "title", "body_col": "content"}'
```

Import to multi-tenant collection:

```bash
uv run scripts/import.py data.jsonl --collection "Workspace" --tenant "tenant1"
```

Import JSON with custom batch size:

```bash
uv run scripts/import.py products.json --collection "Products" --batch-size 500
```

Files in this skill

  • README.md897 B
  • skill.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.