firestore-migrator icon indicating copy to clipboard operation
firestore-migrator copied to clipboard

Uploading multiple csv files in Index?

Open super9xman opened this issue 5 years ago • 1 comments

Hello, Can we upload multiple csv files if they have created the index file? I used your repo example and tried to add to my firestore. Within the "csv-indexed" folder. I ran the following command

fire-migrate import --merge test.INDEX.csv myCollection

How ever, only the first file is written to the database and not the rest....any other way to automatically add one after the other?

I have about 450 rows each in 10 different files.

super9xman avatar Mar 03 '19 17:03 super9xman

Hi super9xman,

You can, either:

  • list the multiple collections from the index file you'd like to import; or
  • import all of them by omitting or specifying '/' as the collection;

For selected collections: fire-migrate import --merge test.INDEX.csv collection1 collection2 collection2/doc6/subcol1

For all collections: fire-migrate import --merge test.INDEX.csv / or fire-migrate import --merge test.INDEX.csv

stildalf avatar Mar 03 '19 19:03 stildalf