CSV Row Import

Map a CSV file into typed Dotabase rows through a guided web workflow or automatable CLI command.

Overview

Description

CSV Row Import provides a focused path from tabular files into an existing Dotabase. In the web app, a guided modal accepts the file, reads its headers, lets the user map source columns to compatible target properties, and submits the import with behavior choices. The CLI exposes the same server capability for scripts and repeatable operations, resolving a Dotabase id, slug, or canonical human id before upload.

The API receives multipart form data containing the CSV and a validated mapping document. It enforces a byte ceiling before duplicating the file in memory, verifies the target Dotabase and requested behavior skips, parses rows, converts values against the target schema, and creates rows through the normal row service. The response summarizes created and failed records instead of hiding partial outcomes.

Selling Points

  • Bring spreadsheets into the knowledge model quickly. A guided mapping step turns familiar columns into typed Dotabase properties.
  • Use the same import from UI or automation. Interactive users get a modal while operators get a CLI-driven multipart workflow.
  • Fail individual rows honestly. Import results distinguish successful and rejected records so bad input does not become silent data loss.
  • Respect the target schema. Mapping validation and property conversion prevent arbitrary columns from bypassing Dotabase types.
  • Keep downstream behavior under control. Users can choose recognized enrichment behaviors to skip for the batch.

User Story

An operations manager receives a customer research export as CSV. They open the target Dotabase, choose Import, map the name, company, status, date, and notes columns to compatible properties, and start the upload. Dots creates the valid rows and returns a clear summary for any malformed records; the same mapping can later be driven from dots rows import in an automated handoff.

Extension Surface

This feature is configurable because the file, header mapping, title column, property conversions, and behavior skips change each import without code. The guided mapping lives in apps/web/src/modules/dotabases/CsvImportModal.tsx, while packages/api/src/routes/import.ts validates the wire contract and target. There is no external parser-plugin registry: new CSV semantics require implementation work, so the configurability rating stops below extensible and pluggable.

Capabilities & Limits

Capabilities include header-aware mapping, typed property conversion, UI and CLI entry points, Dotabase slug and human-id resolution, multipart upload, file-size enforcement, behavior-skip validation, and per-row outcome reporting. The route uses the production row service, so normal schema validation and create behavior still apply.

Limits include a bounded upload size and a deliberately restricted set of property types suitable for CSV conversion. Complex or read-only properties are unavailable, and this is a batch import rather than a persistent source binding: changing the CSV later does not automatically update prior rows. Users needing document bodies, folder watching, or source-path identity should use Local Folder Import and Sync.

Implementation Map

  • apps/web/src/modules/dotabases/CsvImportModal.tsx
  • packages/api/src/routes/import.ts
  • packages/api/src/import/csv.ts
  • packages/cli/src/commands/rows.ts
  • rows import
  • packages/cli/src/services-factory.ts

Properties

Property
Value
product
dots-platform
extensibility
configurable
module
Dotabases, Importers, CLI
packages
api, cli, apps-web
status
shipped
surface
ui
summary
Map a CSV file into typed Dotabase rows through a guided web workflow or automatable CLI command.

Connections

CSV Row Import · Explore connections

  • complementstoMarkdown Directory Import
  • implemented bytopackages/cli/src/commands/rows.ts
  • implemented bytoapps/web/src/modules/dotabases/CsvImportModal.tsx
  • implemented bytopackages/cli/src/services-factory.ts
  • implemented bytopackages/api/src/routes/import.ts
  • implemented bytopackages/api/src/import/csv.ts

Connected Records6

Complements
Implemented by
apps/web/src/modules/dotabases/CsvImportModal.tsx
packages/api/src/import/csv.ts
packages/api/src/routes/import.ts
packages/cli/src/commands/rows.ts
packages/cli/src/services-factory.ts
6 connections.