Ah, well, at least now I feel better about not having been able to
figure out how to do it. Any rough estimate on when it might be
supported? I could certainly go to an auxiliary pseudo-key for this
purpose as you suggest, but that would permanently make my foreign key
management weird for the involved kinds, so I'd very much like to
avoid that if I can.

On Mon, May 24, 2010 at 13:01, Matthew Blain <[email protected]> wrote:
> At the moment the bulkloader does not support numeric keys as the
> entity key. The main reason for this is that numeric ids are designed
> to be managed by the datastore, not be user-generated. You may wish to
> add an additional property to your entity kind which you can sort on.
>
> However we are aware of this. You will need to specify a numeric key
> in the transform (e.g. import_transform: lambda x:
> datastore.Key.from_path(kind, int(x))). We also need to change the
> bulkloader to handle both the creation of an entity with a numeric key
> and more importantly figuring out how to tell the datastore's id
> generation code that we've done this.
>
> --Matthew
>
>
> On May 24, 9:53 am, Craig Berry <[email protected]> wrote:
>> Can someone help me with this, please? I'm sure the answer is trivial,
>> but another weekend of tinkering hasn't led me to the solution.
>>
>>
>>
>>
>>
>> On Fri, May 21, 2010 at 20:21, Craig Berry <[email protected]> wrote:
>> > I have an xml file containing data which I wish to bulkupload to GAE.
>> > I am using the preview version of the new bulk uploader, if that
>> > matters. How do I include an int value for the __key__ derived from a
>> > field in the xml data? If I specify no import transform, like so
>>
>> >    - property: __key__
>> >      external_name: id
>> >      export_transform: transform.key_id_or_name_as_string
>>
>> > it loads the key as a string 'name', so it sorts lexicographically
>> > rather than numerically. I want an int id instead. But I can't find
>> > what to put in as an import_transform to make this happen.
>>
>> > Thanks in advance for any help on this.
>>
>> > --
>> > Craig Berry -http://lapidum.org/home.html
>> > "Magicians lie to the universe, and the
>> > universe believes them."  -- Lenore Berry
>>
>> --
>> Craig Berry -http://lapidum.org/home.html
>> "Magicians lie to the universe, and the
>> universe believes them."  -- Lenore Berry
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine for Java" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group 
>> athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>



-- 
Craig Berry - http://lapidum.org/home.html
"Magicians lie to the universe, and the
universe believes them."  -- Lenore Berry

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to