Skip to content

CLI / rake task for CSV/JSON → model imports without writing Ruby #35

Description

@sncalvo

Problem

The #1 use case — "I have a CSV, I want it imported into table X with upsert on email" — should not require writing Ruby. Many users evaluating the gem just want to point a CLI at a file.

Proposal

bundle exec staging_table import \
  --model User \
  --file users.csv \
  --strategy upsert \
  --conflict-target email \
  --batch-size 5000
  • Ships as a Thor-based CLI (or rake task; pick one)
  • Auto-detects delimiter, headers, BOM
  • Supports CSV and JSONL
  • Dry-run flag (pairs with the dry-run issue)
  • Progress bar (pairs with the progress-reporting issue)

Acceptance criteria

  • CLI installed with the gem
  • Covers CSV and JSONL inputs
  • Outputs a TransferResult summary to stdout, exits non-zero on failure
  • Docs: one-liner in README for the common case

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions