@lungben I like CopyIn. It is powerful and elegant solution. Is it possible to get progress of uploading data with function CopyIn ? I’m trying to get information how much percentage is uploaded. How can I handle percentage status of uploading? Thank you
The whole upload is done with a single execute statement in TableIO:
iter = CSV.RowWriter(table) column_names = first(iter) copyin = LibPQ.CopyIn("COPY $tablename ($column_names) FROM STDIN (FORMAT CSV, HEADER);", iter) execute(conn, copyin)
It may be possible to hook into LibPQ.jl (LibPQ.jl/copy.jl at master · invenia/LibPQ.jl · GitHub) for showing the progress.
Alternatively, you could divide your input data in smaller chunks and upload them sequentially, tracking progress in between. But this may have performance drawbacks.