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

Error while importing CSV file #6069

Closed
SloNN opened this issue Jun 28, 2024 · 1 comment
Closed

Error while importing CSV file #6069

SloNN opened this issue Jun 28, 2024 · 1 comment
Labels
area/cli CLI related issues

Comments

@SloNN
Copy link
Collaborator

SloNN commented Jun 28, 2024

Created test data in PG. Exported data to File from psql

File contents:

date,boolean,uuid,bigint,timestamp without time zone,character varying,character varying[],point,integer,double precision,numeric,json,smallint
2011-11-11,f,c91cd37b-f4c1-4dd4-83b1-a2c9db7ce411,138383838388389,2011-11-11 11:11:33.23,"as;djfa;skldf asdf as;dkfjasdf, asd,f asdf ","{one,two,three}","(12.34,56.78)",12,2342.234393993,12345.67,"{""a"":1}",3

Try to import the file into YDB :

ydb -e grpcs://ydb-pg-5.ru-central1.internal:2135 -d /Root/database --ca-file ~/ydb-ansible-examples/TLS/CA/certs/ca.crt import file csv -p text pg_import.csv

But got an error:

Header contains less fields than data. Header: "", data: "date,boolean,uuid,bigint,timestamp without time zone,character varying,character varying[],point,integer,double precision,numeric,json,smallint"

Other utilities import the CSV-file with no problems.

@SloNN SloNN added the area/cli CLI related issues label Jun 28, 2024
@SloNN SloNN closed this as completed Jun 28, 2024
@SloNN
Copy link
Collaborator Author

SloNN commented Jun 28, 2024

I forgot —header Command Line parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli CLI related issues
Projects
None yet
Development

No branches or pull requests

1 participant