开发者

How do I copy local Google App Engine Python datastore to local Google App Engine Java datastore?

开发者 https://www.devze.com 2022-12-10 04:56 出处:网络
I have around 4000 entities that I need to insert into a Java App Engine datastore.As I understand it, only the Python version of App Engine currently has tools to upload data from a CSV file to a dat

I have around 4000 entities that I need to insert into a Java App Engine datastore. As I understand it, only the Python version of App Engine currently has tools to upload data from a CSV file to a datastore. So, what I have done thus far is follow the instructions at http://code.google.com/appengine/docs/python/tools/uploadingdata.html and have successfully written my 4000 or so entities into my local datastore using Python. I am only using Python for the sake of taking the entities from a .csv and writing them to the datastore. I have verified that the entities are there by using the /_ah/admin address on my local host python version of app engine to see the data viewer.

What I want to do now is to use those entities locally in my initial Java version. Now, this is normally not a problem when the entities are uploaded using Python to the deployed version of App Engine, because different versions of the same project sh开发者_StackOverflow中文版are the same datastore, regardless of runtime. So, If I had been writing all the .csv rows to the deployed Python version of my app, my deployed Java version would be able to see all the entities uploaded through my Python version. BUT, how do you achieve the same thing locally?

As I understand it, the Java version of App Engine creates a local datastore in a .bin file in the WEB-INF directory. Does the Python version of App Engine create a similar .bin file somewhere that I could just copy over into my Java version? I haven't even been able to track down where exactly the Python version is storing its data locally yet. Any help is much appreciated.


The Python and Java local datastore files are not compatible. You can't move directly from one to the other. remote_api support is forthcoming for Java, but until then, you will have to implement your own data loading for the local Java datastore (you can still use the Python loader for the production server).


AppRocket replication I recommend and use daily

0

精彩评论

暂无评论...
验证码 换一张
取 消