English 中文(简体)
谷歌应用发动机散装机在使用Myaml自动生成的配置和具有数字身份的实体时发行
原标题:Google App Engine bulkloader issue when using yaml autogenerated configuration and entities with numeric ID

我的申请使用。 Django non-rel。 我没有办法。

我有我的<条码>推载机:yaml文档,由<条码>ppcfg.py 产生_bulkloader_config。

问题在于实体正在进口数字识别仪,作为关键名称。 因此,如果我出口实体有例如62<>m>>>>/em>的暗中识别码,则该出口实体作为实体进口,其关键名称为 61,其中标明了Django。

Revelant volumeer.yaml 框架:

 property_map:
  - property: __key__
    external_name: key
    export_transform: transform.key_id_or_name_as_string

我试图用散装载机确定下载/上载数据,我希望有数据易于理解格式(如:csv)——因此,使用<条码>推载机——pydump(......)不是一个可行的选择,因为它给我提供了具有实体内容作为单行收集的qlite3文档。

EDIT

我试图做“@Nick”所建议的,我只是一个例外:

 ErrorOnTransform: Numeric keys are not supported on input at this time.

这是否意味着我必须坚持散装载体。 y(使用我们精炼的形式)或我说什么?

www.un.org/Depts/DGACM/index_spanish.htm Header:

- kind: auth_user
    connector: csv
    connector_options:
      encoding: utf-8
      skip_import_header_row: True
      print_export_header_row: True

    property_map:
      - property: __key__
        external_name: key
        export_transform: transform.key_id_or_name_as_string
        import_transform: transform.create_foreign_key( auth_user , key_is_id=True) 

www.un.org/Depts/DGACM/index_spanish.htm 全科:

      Traceback (most recent call last):
      File "/opt/google/appengine/google/appengine/tools/adaptive_thread_pool.py", line 150, in WorkOnItems
        status, instruction = item.PerformWork(self.__thread_pool)
      File "/opt/google/appengine/google/appengine/tools/bulkloader.py", line 693, in PerformWork
        transfer_time = self._TransferItem(thread_pool)
      File "/opt/google/appengine/google/appengine/tools/bulkloader.py", line 848, in _TransferItem
        self.content = self.request_manager.EncodeContent(self.rows)
      File "/opt/google/appengine/google/appengine/tools/bulkloader.py", line 1269, in EncodeContent
        entity = loader.create_entity(values, key_name=key, parent=parent)
      File "/opt/google/appengine/google/appengine/ext/bulkload/bulkloader_config.py", line 385, in create_entity
        return self.dict_to_entity(input_dict, self.bulkload_state)
      File "/opt/google/appengine/google/appengine/ext/bulkload/bulkloader_config.py", line 131, in dict_to_entity
        instance = self.__create_instance(input_dict, bulkload_state_copy)
      File "/opt/google/appengine/google/appengine/ext/bulkload/bulkloader_config.py", line 209, in __create_instance
         Numeric keys are not supported on input at this time. )
最佳回答

你们会去出口——转售钥匙_id_or_name_as_string,但你却没有相应的进口转变。 为此:

property_map:
 - property: __key__
   external_name: key
   export_transform: transform.key_id_or_name_as_string
   import_transform: transform.create_foreign_key( Kind , key_is_id=True)

如果是书面档案中确定的此类名称,请说明。

问题回答

这对我来说是罚款的:

import_transform: transform.none_if_empty(long)




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...