Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a small csv file I would like to bulk load into a Vertica 6.1 database table, this file has 92 lines.

dbadmin=> COPY games FROM '/tmp/games.csv' DELIMITER ',';
 Rows Loaded
-------------
          44

The file is 92 lines, but Vertica only loads 44 lines. As a test, I tried loading the same file in MySQL, and all 92 lines loaded fine.

I verified the file has 92 lines.

[root@localhost tmp]# cat /tmp/games.csv | wc -l
92

I opened the file and verified it has no unusual characters.

Any ideas?

share|improve this question

1 Answer 1

Try option ABORT ON ERROR - will output a reason for rejection.

COPY 'table name' FROM '/path/to/data.txt' DIRECT RECORD TERMINATOR ',' ABORT ON ERROR 

Check rejected and exception files or define it in COPY:

COPY 'table name' FROM '/path/to/data.txt' DIRECT RECORD TERMINATOR ',' REJECTED DATA 'path' EXCEPTIONS 'path' 

https://community.vertica.com/vertica/topics/bulk_loading

share|improve this answer
1  
If you plan on answering your own questions, you may want to consider asking your question as a community wiki. –  Kermit Feb 5 at 18:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.