简体   繁体   中英

How to export data from google appengine in java

I want to export data from data store of appengine to .CSV format. But I cant find anything in java which will be useful to export it. Do I need to setup python and then only I can do it. But I dont want in python.

You have multiple choices to export your data and you will have to investigate each one to see which one fits the bill.

  • Assuming that you are using Java, write a Servlet that can take the request, query your datastore and create the data to be exported. The Servlet can then return back the correct MIME Type to allow the downloading of the file.
  • You can use the URL Service to push data out of your system. This will assume that the Service that you invoke resides somewhere else.

Please ensure that if you go with a Servlet that does the work, then look at Securing that endpoint - so that only authorized users can do that.

Here is a thread that shows how you can export a PDF file from your application. While the example is that of PDF, you can easily customize the Template for your CSV file. The MIME type will be text/plain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM