vibepg import
Synopsis
bash
vibepg import <name> <table> <file> [--schema <schema>] [--columns <cols>] [--delimiter <delim>] [--no-header]Description
Import a CSV (or TSV, or other delimited file) into a table. vibepg streams the file into the container and runs \copy <table> FROM STDIN, so you don't need psql or pg_restore on your host.
Arguments
| Name | Required | Description |
|---|---|---|
name | yes | Instance name |
table | yes | Target table name. PostgreSQL identifier rules. |
file | yes | Path to the CSV/TSV file on your host |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--schema | string | public | Schema containing the target table |
--columns | string | (none) | Comma-separated column list (e.g. id,name,email) |
--delimiter | string | , | Field separator. Use \t for tabs. |
--no-header | bool | false | The file has no header row |
Examples
bash
# Default CSV with header
vibepg import demo users users.csv
# TSV with custom schema and explicit columns
vibepg import demo events events.tsv \
--schema analytics \
--delimiter "\t" \
--columns id,event_type,created_at
# Headerless pipe-delimited file
vibepg import demo audit audit.txt --delimiter "|" --no-headerNotes
- The table must already exist. Use
runwith a schema file if you need to create it first. --columnsis required when the CSV doesn't include all the table's columns or when column order differs.- Identifier-safe rules apply to
--schema,--columns, and<table>.