Exporting data from local standard environment and importing it in Datastore Emulator

可紊 提交于 2019-12-25 08:20:28

问题


We have two app engine apps, which read/save to the same datastore (that is, same project). Datastore is actually the way they "transfer data" to each other.

One of the apps is running on standard environment, and the other is running in the flexible environment.

In the flexible environment, to run local tests in my machine, without using google datastore servers, I have to use the Datastore Emulator, which it's configured already.

What I would like now is to find a simple way to export data saved in the standard environment app (created using dev_appserver.py) and import it in the datastore emulator.

I would NOT like to push the data google servers and export from there, if that could be avoidable, instead exporting from the database that ran in my local machine.

Is there a feature/library which might help me with this task?


回答1:


In my tests, I found that the database files created by AppEngine Dev and Datastore Emulator are compatible. I was able to copy the local_db.bin from app-engine database to replace the same file in Datastore Emulator's data directory and was able to access the data.



来源:https://stackoverflow.com/questions/42139307/exporting-data-from-local-standard-environment-and-importing-it-in-datastore-emu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!