Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine: Error in bulkloader.yaml

I am currently trying to download and exports tables from a Google App that I inherited. I am using their Python Framework. Here are the relevant lines in the bulkloader.yaml file:

- kind: KindName
  connector: csv
  connector_options:
    encoding: utf-8
    print_export_header_row: true

  property_map:
    - property: __key__
      external_name: key
      export_transform: transform.key_id_or_name_as_string
    - property: field1
      external_name: field1
    - property: keyInAnotherTable
      external_name: keyInAnotherTable
      import_transform: transform.none_if_empty(transform.create_foreign_key('AnotherTable'))
      export_transform: transform.key_id_or_name_as_string

Then when I run the buklloader, I first must wait over an hour for everything to download, and then finally it finishes with this error:

google.appengine.ext.bulkload.bulkloader_errors.ErrorOnTransform: Error on transform.
Property: keyInAnotherTable External Name: keyInAnotherTable. Code: 
transform.key_id_or_name_as_string Details: 'unicode' object has no attribute 'to_path'

I can't seem to find any relevant information via Googling.

Thanks in advance.

Also Is there any way to export straight from the downloaded sql3 file into CSV so that I don't have to download so many times?

like image 400
Kenny Cason Avatar asked Mar 05 '12 19:03

Kenny Cason


1 Answers

This question deserves an answer (as contributed by @skurt, @Robert Lujo, @Kenny Cason).

Have a read of the following references to assist with resolving issue with bulkloader failing after an hour:

  • AppEngine bulkloader export Model with self-defined Property
  • https://developers.google.com/appengine/docs/python/tools/uploadingdata?hl=en#Using_Automatic_Configuration
like image 63
miltonb Avatar answered Oct 26 '22 22:10

miltonb