How to quickly bulk insert into postgres

Will that approach with the DataFrame be any way preferable over the copyin approach of the docs copyin = LibPQ.CopyIn("COPY libpqjl_test FROM STDIN (FORMAT CSV);", row_strings)? I am currently struggling with the LibPQ.CopyIn. One there is the way they show on how to make that Iterator, and I am getting error about the UTF8 errors on some of the CSV strings. Should I just put in the DataFrame instead?

error | LibPQ]: CharacterNotInRepertoire: ERROR:  invalid byte sequence for encoding "UTF8": 0xa0
ERROR: CharacterNotInRepertoire: ERROR:  invalid byte sequence for encoding "UTF8": 0xa0
1 Like