if I delete the contents of this .json file, then ...
# prisma-whats-new
j
if I delete the contents of this .json file, then import command goes through (without making any changes of course)
l
Hi Joe, I've had luck unzipping the exported data and pointing import to the source folder
j
hey
yeah, ive tired that as well, but no luck 😞
l
The other big thing is the obvious one -- make sure the exported schema is compatible with the imported. I've had some ENUMs off that caused this error
j
let me check that
just ran an export command, copy/paste output but it wont import. very strange.
n
can you reproduce the same problem with a "smaller" data model?
j
let me try
hey nilan, I was able to get it to work, but it requires me to provide an id field. However, since im importing from MS SQL database, I dont have those ids generated yet. I was under an impression that prisma import will generate new nodes for me. is there another mechanism for importing my data into prisma that I had missed?
n
No, you are required to provide an
id
value upon import. - we should catch that error with a useful error message - we should think about a new feature that automatically generates ids upon importing nodes without ids. I will create feature requests for both.
👍 2
j
awesome, can I use tsql-generated guids in place of prisma id's in the meantime?
n
You can use any unique string that is at least 25 characters.
j
👍
also, just wanted to say kudos to you guys for creating such an awesome product! My dev team loves it, and we are getting tons of lift. Prisma came out just at the right time since we are rewriting our line of business app from scratch. There are still some growing pains since it is so new, but you guys are doing an awesome job supporting it.
🙌 1
n
Thanks so much @joe 🙂
I tried to reproduce your problem, but I m receiving this error message:
▸ Object {"name":"nilan","updatedAt":"2018-03-21T163404.000Z","_typeName":"NoId","createdAt":"2018-03-21T163404.000Z"} needs an id property
did you also receive this error message?
I described the feature request here: https://github.com/graphcool/prisma/issues/2134
j
yup, got that error as well