Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere are the reference pages of the Google App Engine bulkloader transform?
    text
    copied!<p>From an empty datastore, I was able to auto-generate a <code>bulkloader.yaml</code> file. It only contains the <code>python_preamble</code>, but the <code>transformers</code> section was empty.</p> <pre><code>python_preamble: - import: google.appengine.ext.bulkload.transform - import: google.appengine.ext.bulkload.bulkloader_wizard - import: my_own_transformers - import: data_models # This is where the SomeData class is defined. # some more imports here </code></pre> <p>Then based on the examples in the documentation, I need to define a property map for each of the columns in my CSV:</p> <pre><code>transformers: - kind: SomeData connector: csv property_map: - property: date import_transform: transform.some_undocumented_function </code></pre> <h1>Two Questions:</h1> <p>My understanding is that the function defined as the <code>import_transform</code> will transform the ordinary CSV string into a <a href="http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html" rel="nofollow">Property Class</a> worthy of the datastore. I want to understand how the transforms work, so I think I have two alternatives.</p> <ol> <li><p>Where is the library reference for <code>google.appengine.ext.bulkload.transform</code>? I want to know how to use <code>transform.some_undocumented_function</code>, as well as all the other <code>transform.some_other_undocumented_transformers</code></p></li> <li><p>You can see from my <code>python_preamble</code> that I <code>- import: my_own_transformers</code>. In that module, I defined a function <code>transform_date</code> that takes an ISO date string such as <code>2001-01-01</code> and transforms it into a type that can fit into <code>db.DateProperty()</code>. If my concept is correct, can I use:</p></li> </ol> <pre> property_map: - property: date import_transform: my_own_transforms.transform_date </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload