postgres-copy icon indicating copy to clipboard operation
postgres-copy copied to clipboard

Skip columns not present in table?

Open eric-khoury opened this issue 5 years ago • 1 comments

When copying from CSV to DB, would there be any way of skipping a column if it doesn't map to any table row in the DB?

eric-khoury avatar Sep 16 '20 19:09 eric-khoury

@eric-khoury have you used the option to specify the columns as in the README example:

User.copy_from "/tmp/users.csv", :map => {'name' => 'first_name'}

diogob avatar Sep 24 '20 14:09 diogob