1

I was wondering how does Datastore Viewer from the AppEngine admin panel, order the entities?

I know I can run queries on the datastore and sort them any way I wish, but I would like to be able to see the latest entities added to a kind when I go in the Datastore Viewer. Instead, the entities returned by the Datastore Viewer are rather in a random order or ordered by the fist property.

This index.yaml configuration (which indicates to order by date property) seems to have no effect on the results returned by the Datastore Viewer:

indexes:
- kind: HitLog
  ancestor: yes
  properties:
  - name: Date
    direction: desc

1 Answer 1

2

I'm guessing the admin page entities are sorted by their Key (name/id). Id's aren't generated in order, so you'll end up with a pretty random looking sort order.

AFAIK, there's no way to use configure the Datastore Viewer except to specify your own custom GQL query on the Datastore Viewer page.

Frankly though the Datastore Viewer becomes less and less useful as your data set gets larger, you generally have to end up writing your own tools.

Hm, a better datastore viewer would be a good open source project.

1
  • I am writing a custom datastore viewer using datastore queries (not GQL), but I was trying to cut corners, hoping I could at least see the latest 20-60 entities in the Admin panel
    – Chris
    Aug 8, 2013 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.