Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

Import of CSV files into a GraphCool Project #548

Open kdipaolo opened 5 years ago

kdipaolo commented 5 years ago

I am trying to import a backup of data that I got from the graph cool (Prisma) team into a different project on the Graph Cool framework. The backup is a zip folder with a bunch of CSV files. I don't see anywhere in the documentation on how to import CVS files via the command line.

I've tried the following commands view the command line inside of my local graph cool project to import the data into my new project:

graphcool import --data test.zip --target dev graphcool import -d test.zip -t dev

and this is the response i get: Unknown flag —data

I also tried graphcool import --source test.zip --target dev and get the following:

Invalid signature: 0x80014

Any solutions/help on importing CSV files into a GraphCool project would be greatly appreciated.

Thank you!

divyenduz commented 5 years ago

@kdipaolo : Can you validate that the CSV is in valid NDF format?

If no, we might have to convert it to NDF shape and import to work properly.

kdipaolo commented 5 years ago

@divyenduz I don't believe it is a valid NDF format, they are just plain CSV files. How can I convert it to a valid NDF Shape?

divyenduz commented 5 years ago

@kdipaolo : If possible, can you write a small script that converts the CSV to NDF following the documentation here.