Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pgimport] Wrong imported bytes #370

Open
turicas opened this issue Feb 7, 2023 · 0 comments
Open

[pgimport] Wrong imported bytes #370

turicas opened this issue Feb 7, 2023 · 0 comments

Comments

@turicas
Copy link
Owner

turicas commented Feb 7, 2023

The progress bar is not updated correctly: number of imported bytes is lower
than file size (at least for uncompressed CSV files).

Giving the file test.csv (305 bytes):

Project,Client,Description,Duration
P23,Client ÁÁÁÀçç,Some task num. 01,01:08:56
Project N. 12,Client num. 1,Some task number 02,00:55:00
Proj 2,Client num. 1,Some task number 123456789012,06:31:17
Project 2,Client num. 1,Some task number 123456,01:18:49
Project 2,Client num. 1,Task n. 12,02:04:23

By running:

rows pgimport -s :text: -d excel -e utf-8 test.csv $DATABASE_URL test

I got the result:

5 rows imported:  88%|████████████████████████████████████████▌     | 269/305 [00:00<00:00, 6.28kbytes/s]

It seems the header size is not being counted. We may change the header, so we need to add to progress the original header size (currently even the written header size is not being added to imported bytes).

Note: the file is in UTF-8 and even if it haven't special chars, the imported
bytes will still be less than file size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant