google-cloud-datastore

Create entity using datastore viewer Google App Engine

人走茶凉 提交于 2019-12-01 03:59:54
问题 I would like to create an entity in my datastore from the admin console on google app engine. To do this, I read I must clicked on the tab "create" in the datastore viewer BUT I don't have this link. I have just the "query" tab and as I have no data, nothing appears. How can I create an entity from the admin console on google app engine? 回答1: App Engine will only let you create new entities for a Kind that has already been defined. If you haven't ever saved anything to the datastore, your

How to best handle data stored in different locations in Google BigQuery?

强颜欢笑 提交于 2019-12-01 03:10:46
问题 My current workflow in BigQuery is as follows: (1) query data in a public repository (stored in the US), (2) write it to a table in my repository, (3) export a csv to a cloud bucket and (4) download the csv on the server I work on and (5) work with that on the server. The problem I have now, is that the server I work on is located in EU. Thus, I have to pay quite some fees for transfering data between my US bucket and my EU server. I could now go ahead and locate my bucket in EU, but then I

Is it possible to have a computed property on Google App Engine using Java?

谁都会走 提交于 2019-12-01 01:49:53
I have an app engine application and I want to run a query that sorts the result based on a expression involving two properties. Best way I thought of doing it so far is to create a computed/calculated property that stores the result of that expression. Although I saw that GAE in Python offers a ComputedProperty, which seems to be exactly what I'm looking for, I couldn't find an equivalent in Java. I'm currently using Objectify too, if that helps. Any ideas? Compute your value in an @OnSave method: @Entity public class YourEntity { @Id Long id; String foo; String bar; @Index String computed;

Appengine: put_async doesn't work (at least in the development server)?

陌路散爱 提交于 2019-12-01 01:41:46
问题 NOTE : IT DOES WORK IN PRODUCTION. I MEAN, WHEN I UPLOAD THE APPLICATION IT JUST WORKS FINE. THE PROBLEM IS IN THE DEVELOPMENT SERVER. Here is some code that can show you what i'm trying to do: e = Employee(key_name = 'some_key_name',name='John Bonham') db.put_async(e) If i do it, and after some time i try to get it e = Employee.get_by_key_name('some_key_name') # e is None It doesn't work. e is None! But, if i do this: e = Employee(key_name = 'some_key_name',name='John Bonham') op = db.put

Can the recently released GAE PHP runtime access the native GAE datastore?

╄→гoц情女王★ 提交于 2019-11-30 23:17:46
Google just announced support for a PHP runtime for App Engine. I have an app developed using the Java runtime which utilizes the native App Engine datastore. It currently functions as a back end for mobile clients. We are looking into developing a separate web front end which would need to interface this datastore. The developer working on this prefers to develop in PHP, so the timing of this announcement is interesting. Looking over the documentation however, I only see reference to Google Cloud SQL as well as Google Cloud Storage as options under "Storing Data." Is it possible to interface

“Too much contention” when creating new entity in dataStore

谁说胖子不能爱 提交于 2019-11-30 22:58:17
问题 This morning my GAE application generated several error log: "too much contention on these datastore entities. please try again.". In my mind, this type of error only happens when multiple requests try modify the same entity or entities in the same entity group . When I got this error, my code is inserting new entities. I'm confused. Does this mean there is a limitation of how fast we can create new entity? My code of model definition and calling sequence is show below: # model defnition

Change IntegerProperty to FloatProperty of existing AppEngine DataStore

两盒软妹~` 提交于 2019-11-30 21:01:15
I built an appengine application (python) which need to convert existing datastore entities in integer value (100) to float value (100.00) for currency conversion issue. How's the right way doing this? Since my query returning error when i just change property type in my model. Old Model: class Learn(search.SearchableModel): pid = db.ReferenceProperty(Product, collection_name='picks') title = db.StringProperty() description = db.TextProperty() order = db.IntegerProperty() cost = db.IntegerProperty(default=0) cost1 = db.IntegerProperty(default=0) New Model: class Learn(search.SearchableModel):

Accessing related object key without fetching object in App Engine

半城伤御伤魂 提交于 2019-11-30 19:50:45
In general, it's better to do a single query vs. many queries for a given object. Let's say I have a bunch of 'son' objects each with a 'father'. I get all the 'son' objects: sons = Son.all() Then, I'd like to get all the fathers for that group of sons. I do: father_keys = {} for son in sons: father_keys.setdefault(son.father.key(), None) Then I can do: fathers = Father.get(father_keys.keys()) Now, this assumes that son.father.key() doesn't actually go fetch the object. Am I wrong on this? I have a bunch of code that assumes the object.related_object.key() doesn't actually fetch related_object

Can the recently released GAE PHP runtime access the native GAE datastore?

亡梦爱人 提交于 2019-11-30 18:34:03
问题 Google just announced support for a PHP runtime for App Engine. I have an app developed using the Java runtime which utilizes the native App Engine datastore. It currently functions as a back end for mobile clients. We are looking into developing a separate web front end which would need to interface this datastore. The developer working on this prefers to develop in PHP, so the timing of this announcement is interesting. Looking over the documentation however, I only see reference to Google

Beta Firebase Firestore won't work with projects using app engine

一世执手 提交于 2019-11-30 17:48:11
When I try to add the beta firestore to my Google cloud platform project I get the following message. Cannot enable Firestore for this project Currently Firestore cannot be enabled in projects already using Cloud Datastore or App Engine Is this going to last forever? I think I would like to replace some but not all of my datastore stuff with firestore to get realtime updates. Perhaps firestore uses datastore and appengine in its backend? Should I use two GCP projects to get around this problem? Thanks, Nathan Dan McGrath This is currently a technical restriction we hope to remove in the future