google-cloud-datastore

efficient searching using appengine datastore ancestor paths

爷,独闯天下 提交于 2019-12-13 15:00:42
问题 We have a mulch-tenancy and I need to search and fetch in a huge appengine datastore based on an indexed attribute range and client id. Does usage of Ancestor Paths make it efficient ? Alternatively Same can be done using an additional filter e.g. to get the top 100 salaries via objectify Key<Clients> clientIdKey = Key.create(Clients.class, 500) ofy().load().type(Salaries.class).ancestor(clientIdKey).order("-salary").limit(100).list() Alternatively just ofy().load().type(Salaries.class)

Ancestor query parse error

☆樱花仙子☆ 提交于 2019-12-13 14:24:07
问题 I am trying to get my ancestor query to work but I keep getting this error: BadQueryError: Parse Error: Identifier is a reserved keyword at symbol ANCESTOR at this line: TweepleKey(twitter_handle)) I was following Using the Datastore tutorial (which works) but when I tried to apply the concepts of ancestor query to my code (see below) it keeps producing the above mentioned error. Where did I go wrong? import cgi import urllib import webapp2 import cgi from google.appengine.ext import db #

How to deal with eventual consistency in fork-join-queue

穿精又带淫゛_ 提交于 2019-12-13 14:09:12
问题 I'm currently looking to replace a flawed implementation of the fork-join-queue described in the following video: https://youtu.be/zSDC_TU7rtc?t=33m37s I realize that this video is nearly eight years old now, and I would be very happy to learn of any potential new and better ways to do such things, but for now I'm focusing on trying to make this work as described by Brett. As of right now, what's in front of me is a bit of a mess. One of the things the original developer did differently from

Migration from Google cloud datastore to Google cloud sql

十年热恋 提交于 2019-12-13 12:35:32
问题 We are using Google Cloud Datastore for our Google App Engine (GAE) application. During our project revamp we want to migrate our DB into Google Cloud SQL from Datastore. We have around 1 TB data in Datastore excluding indexes. How to migrate from Datastore to Cloud SQL, is there any existing open source solutions available for this. I have checked the following one https://cloud.google.com/datastore/docs/export-import-entities , which is not helpful for migrating data between datastore and

App Engine Datastore - devserver limits

旧城冷巷雨未停 提交于 2019-12-13 12:11:54
问题 I'm trying to test the efficiency of the Google App Engine Datastore database. I want to know how fast it will query over a large dataset. And by large, I mean like 5-10mil entities of the same kind. The devserver only lets me input 1000 entities of the same kind. Is there a way to up this limit? Thanks 回答1: I presume you're talking about the admin interface on http://localhost:8080/_ah/admin/? If you want to insert many entries, you should be using code, or the bulkloader. There's no limit

Google App Engine Datastore entities. Efficiency and structure

走远了吗. 提交于 2019-12-13 07:13:31
问题 I am interested in knowing the best structure, for speed and cost efficiency, of Google App Engine Datastore entities. As an example, an app about Clubs. Structure A: A single ndb.Model entity per club with: Name, ID, Address, Contacts, Tags, Reviews, Images etc Structure B: Multiple Entities per club with a KeyProperty referencing the club. ndb.Model Entity A. Name and ID ndb.Model Entity B. Address ndb.Model Entity C. Contacts etc Considering that users might only want to look up addresses

How to ensure that my entity will never be an orphan?

一曲冷凌霜 提交于 2019-12-13 05:51:38
问题 Sometimes, you make an entity kind that is supposed to exist in another entity. However, if it turns into an orphan, it will have no reason to exist in the datastore anymore. What happens to child datastore objects after deleting the ancestor? According to the link above, "Child entities do not get deleted when the ancestor is deleted" "child_entity.key.parent().get() will return None." If I delete the ancestor, the child will have no parent, making it an orphan. This is a problem, as there

Entity hierarchies in Objectify 4.0

心已入冬 提交于 2019-12-13 05:37:03
问题 Is there a way how to define an entity hierarchy that enables to query just particular subclass? Consider situation below. Let's have abstract Base class that defines common properties and concrete subclasses A and B. class abstract Base { ... } class A extends Base { ... } class B extends Base { ... } I would like to run for example queries as follows. To retrieve all entities of type A and B Base base = this.objectify.load().type(Base.class).list(); To retrieve all entities of type A Base

Does GAE Datastore support 'partial text search'?

隐身守侯 提交于 2019-12-13 05:09:21
问题 I'm very beginner. I want to make a information management system using Go language on Google App Engine. Users will create, edit, delete and search entities. I have navigated GAE site, but could not find 'partial text search' on Datastore. Partial text search, I mean, search entities contain 'partial text' entered. Or, can you give me a tip to make such a system. (for free) Very Sorry for low-grade question. 回答1: You can't do this with the datastore, you need to use the full-text search API.

App Engine DataStore - Compound Indexes - datastore-indexes - not working

爷,独闯天下 提交于 2019-12-13 04:47:53
问题 I am unable to search entities using compound indexes. I am using Objectify 4. Entity configuration: @Entity @Unindex class MyEntity implements Serialiable { @Id String id; String one; String two; long three; } Index configuration: <datastore-indexes autoGenerate="true"> <datastore-index kind="MyEntity" ancestor="false"> <property name="one" direction="asc" /> <property name="two" direction="desc" /> </datastore-index> </datastore-indexes> I see the indexes built in DataStore Indexes .