質問

i have a .csv file that holds person datas.A line for a person like this.

"20781","IN","Ms.","Roy","","Serrano","2002-04-16 00:00:00","20781@adventure-works.com"

How can i give field names to mongoimport?

Field names -> id,type,firstname,middlename,lastname,modifieddate,e-mail.

役に立ちましたか?

解決

you can do like Bellow

mongoimport -d test -c person -type csv --file person.csv --fields "id,type,firstname,middlename,lastname,modifieddate,e-mail"

this will import your file as in one document.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top