如何从java中的google appengine导出数据

时间:2022-11-22 23:26:02

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.

我想将数据从appengine的数据存储导出为.CSV格式。但我无法在java中找到任何有助于导出它的东西。我需要设置python,然后我才能做到。但我不想在python中。

1 个解决方案

#1


0  

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.
  • 假设您使用的是Java,请编写可以接收请求的Servlet,查询数据存储区并创建要导出的数据。然后,Servlet可以返回正确的MIME类型以允许下载文件。

  • 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.
  • 您可以使用URL服务将数据推出系统。这将假定您调用的服务驻留在其他位置。

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.

请确保如果您使用执行该工作的Servlet,请查看保护该端点 - 以便只有授权用户才能执行此操作。

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.

这是一个线程,显示如何从应用程序导出PDF文件。虽然示例是PDF,但您可以轻松自定义CSV文件的模板。 MIME类型将是text / plain。

#1


0  

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.
  • 假设您使用的是Java,请编写可以接收请求的Servlet,查询数据存储区并创建要导出的数据。然后,Servlet可以返回正确的MIME类型以允许下载文件。

  • 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.
  • 您可以使用URL服务将数据推出系统。这将假定您调用的服务驻留在其他位置。

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.

请确保如果您使用执行该工作的Servlet,请查看保护该端点 - 以便只有授权用户才能执行此操作。

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.

这是一个线程,显示如何从应用程序导出PDF文件。虽然示例是PDF,但您可以轻松自定义CSV文件的模板。 MIME类型将是text / plain。