[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
If you add a property such as: created_at = db.DateTimeProperty (auto_now_add=True) to the models you are moving, you could then query on that property to find entities created during any timeframe. It won't retroactively apply to entities created before you changed the model, but this doesn't appear to be necessary for what you're trying to do. On Jun 22, 1:58 pm, Jonathan Feinberg wrote: > I'm moving my application off of GAE. > > I'd like to download all of my data, develop and deploy the new > implementation, then get the rest of the data, which had been created > in the meantime. Is there a way to do so? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
On Jun 22, 2:18 pm, Tony wrote: > If you add a property such as: created_at = db.DateTimeProperty > (auto_now_add=True) to the models you are moving, you could then query > on that property to find entities created during any timeframe. That's true. What does that have to do with appcfg.py download_data? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
Having re-read your original question, I see now that my answer doesn't apply at all :P To do this with appcfg.py download_data, I'd see what you can do with the exporter class that you're defining for each model that you're downloading. You could add a timestamp field as I suggested, and define a function in your exporter class that tests that this field exists and/or is within a particular range. From there, you could either set a boolean value and use it to pare down your result set in post-processing, or raise an exception. You're probably not going to avoid having to download every entity (without patching download_data.py) as the functionality you're looking for doesn't appear to exist. Hope that's more helpful. On Jun 22, 2:19 pm, Jonathan Feinberg wrote: > On Jun 22, 2:18 pm, Tony wrote: > > > If you add a property such as: created_at = db.DateTimeProperty > > (auto_now_add=True) to the models you are moving, you could then query > > on that property to find entities created during any timeframe. > > That's true. What does that have to do with appcfg.py download_data? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
On Jun 22, 2:29 pm, Tony wrote: [snip] > Hope that's more helpful. I'm hoping that someone who actually knows the answer--someone with google.com in their email address--will contribute to this thread. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
I'll ignore your rudeness and answer the question in case someone else finds this thread and has a similar question: class ModelNameExporter(bulkloader.Exporter): def handle_entity(self, entity): if entity was created between x and y: return entity else: return None You may ignore my post and wait for someone with a @google.com email address to answer your question. On Jun 22, 2:38 pm, Jonathan Feinberg wrote: > On Jun 22, 2:29 pm, Tony wrote: > [snip] > > > Hope that's more helpful. > > I'm hoping that someone who actually knows the answer--someone with > google.com in their email address--will contribute to this thread. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: download_data: Can I get only entities created since some arbitrary point in time?
Hi Jonathan, My answer is exactly the same as Tony's. Either add a timestamp field to your entities, so you can filter on that, or otherwise mark your existing entities as already downloaded. All I would add is that you can use remote_api directly to query on only updated entities, if you wish. -Nick Johnson On Mon, Jun 22, 2009 at 7:38 PM, Jonathan Feinberg wrote: > > > > On Jun 22, 2:29 pm, Tony wrote: > [snip] > > Hope that's more helpful. > > I'm hoping that someone who actually knows the answer--someone with > google.com in their email address--will contribute to this thread. > > > > -- Nick Johnson, App Engine Developer Programs Engineer Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---