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

Parse Import Function Disappeared #336

Closed
smooret2k opened this issue May 11, 2016 · 13 comments
Closed

Parse Import Function Disappeared #336

smooret2k opened this issue May 11, 2016 · 13 comments

Comments

@smooret2k
Copy link

The Parse import function is no longer present on the dashboard.

@stretchnz
Copy link

I also have this issue - as do others judging on stack overflow boards.
Can we get an official word on why this may be?

@pascalgiguere
Copy link

Same issue here. Weird that they'd discontinue this feature without any warning.

If anybody has a workaround, I'd be interested. I am trying to import thousands of objects from a JSON file.

@takiwax
Copy link

takiwax commented May 11, 2016

Same here. I really need this function to replace data with exact same objectId.

@pascalgiguere
Copy link

pascalgiguere commented May 12, 2016

I was going to write a custom node script that uses Parse's REST API to replicate the import feature, but then I realized it doesn't seem possible given that you cannot manually set the objectId when creating new objects... This is problematic in my case so I hope the feature is coming back soon.

Edit: My issue with objectIds changing is that it would mess up pointer relations of another class pointing my imported class if I were to delete data then import it back from a JSON backup. The workaround I found was to update those pointers with the new objectIds generated during import. See my other post below for gist.

@powhu
Copy link

powhu commented May 12, 2016

As you might have heard, Parse will be shutting down in January next year and we encourager every developer to migrate their database off Parse and eventually setup their own Parse Server (which is now Open Source).

https://developers.facebook.com/bugs/1299703926710381/

I asked this question on FB Developer support. They say they won't fix......

@pascalgiguere
Copy link

pascalgiguere commented May 12, 2016

I made a node.js script that allowed me to replicate Parse's import feature. It worked for my specific use case, but you probably will want to adapt it depending on your needs.

What this allowed me to accomplish was:

  1. Export JSON backup of a Parse class using Parse's export feature.
  2. Drop entire Parse class using Parse's dashboard.
  3. Re-import data from the exported JSON file back into Parse using this script.
  4. The imported data will have different objectIds compared to the backup. The script will however take care up updating pointers of another Parse class so that pointer relations don't break despite the objectId change.

https://gist.github.com/pascalgiguere/6978c87a2e9a63ddf7577ddaf1b32f3c
Use at your own risk and feel free to improve / adapt for other use cases!

Fill out the constants on top before running.
If you just want a basic JSON import without updating any pointers from other classes, you can comment out updatePointingObjects at line 16.

@drew-gross
Copy link
Contributor

https://developers.facebook.com/bugs/1299703926710381/

I asked this question on FB Developer support. They say they won't fix......

Looks like this has been answered by Facebook. You should migrate your database, then import directly to mongo.

@KapoorKarn
Copy link

All, take a look at mongochef (http://3t.io/mongochef/), i've been using it since the removed the bulk import function from the dashboard. Mongochef has allowed me to easily add/remove/modify classes.
I've been able to import semi large csv's to my dbs (roughly 10k records). For large csv files i've been doing a bulk import. There is a commercial and non-commercial option available.

I know some other have mentioned some ways to import as well, but i'm not very skilled in scripts, shells, or yadda yadda. Anyway, just wanted to post in case it helped someone.

@Treverr
Copy link

Treverr commented Apr 6, 2017

Im a but confused as to why we are told "import directly using MongDB" when you can't do that and parse be able to use/see the files......?

@stretchnz
Copy link

I have long given up on parse.com hosting.
We are using NodeChef which has a Parse hosted Dashboard.
It also allows direct import via CSV / JSON etc, very very nice for what we need.

@Treverr
Copy link

Treverr commented Apr 6, 2017

We are hosting it all ourselves and are in a situation where we need to import the data. But alas this vital piece was left out.

@stretchnz
Copy link

hmm cant help there then sorry, was not prepared to entertain the idea of hosting ourselves.

@flovilmart
Copy link
Contributor

It sure what you mean by import the data, you can use mongo to import existing tables, or the SDK's to write the data in à Parse specific format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants