问题描述
我已经使用java创建了Web应用程序.我想从appengine数据仓库下载数据,以便使用BulkLoader概念.
I have created web application using java.I wantted to download data from appengine datastroe so that I am using BulkLoader concept.
在我的项目中,我按如下方式设计了实体
In my project I designed entity as follows
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long school_id;
@Basic
private String schoolname;
此后,我尝试下载数据,以便创建了bulkloader配置文件.它创建成功,但是默认情况下自动生成的bulkloade.yaml文件存在一个问题(iE)export-transform将主键转换为字符串,但是我需要长数据类型如何实现这一点.
After that I tried to download data so that I created bulkloader configuration file .It created successfully but I that default auto generated bulkloade.yaml file I have one problem(i.E)export-transform convert Primary key into string, but I need Long datatype how to achieve this.
bulkloader文件的内容为
The content of bulkloader file is
- kind: School
connector: csv
property_map:
- property: __key__
external_name: key
export_transform: transform.key_id_or_name_as_string
- property: schoolname
external_name: schoolname
如何解决这个问题预先感谢
How to solve this Thanks in advance
推荐答案
尝试 export_transform:datastore.Key.name
这篇关于BulkLoader -export_transform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!