google-cloud-datastore

How do I find my 'datasetID' for making google datastore queries?

我们两清 提交于 2019-12-25 02:26:52
问题 How do I find my 'datasetID' for making google datastore queries? This site is supposed to tell me how to query my google datastore: https://developers.google.com/datastore/docs/apis/v1beta2/ and it says the base URL is: https://www.googleapis.com/datastore/v1beta2/datasets the tutorial says to use a 'datasetID', so for example a full URL could be: https://www.googleapis.com/datastore/v1beta2/datasets/12345/lookup But I don't know how to figure out what my 'datasetID' is. On the google

How to use google provided template [pubsub to Datastore]?

女生的网名这么多〃 提交于 2019-12-25 00:17:53
问题 I want to use this google provided template which stream data from pubsub to datastore. https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/master/src/main/java/com/google/cloud/teleport/templates/PubsubToDatastore.java I follow the step wrote this document. https://github.com/GoogleCloudPlatform/DataflowTemplates I pass this step. mvn clean && mvn compile But next step, the error occured. [INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ google-cloud-teleport-java --- 2018-08

Simple DB query on Google App Engine taking a lot of CPU time

耗尽温柔 提交于 2019-12-24 20:21:37
问题 I'm fairly new to Google App Engine and Python, but I did just release my first real-world site with it. But now I'm getting problems with one path that is using significantly more CPU (and API CPU) time than the other paths. I've narrowed it down to a single datastore fetch that's causing the problem: Carvings.all().fetch(1000) Under the App Engine dashboard it's reporting "1040cpu_ms 846api_cpu_ms" pretty reliably for each request to that path. It has seemed like this may be the source to

Is it possible to implement create a web project in Spring Boot + Datastore?

时间秒杀一切 提交于 2019-12-24 20:07:04
问题 I'm currently new to web developing and right now I started with a Spring Boot application which I converted to standard App Engine project. I'm wondering if it is possible to not convert my Spring Boot application to my App Engine project and still use Datastore as database? 回答1: Yes, it's possible to use the Cloud Datastore from an app in the GAE flexible environment, from outside GAE or even from outside the Google Cloud. From Cloud Datastore (emphasis mine): You can access Cloud Datastore

How to get latest and adjacent records from the datastore?

六月ゝ 毕业季﹏ 提交于 2019-12-24 17:55:57
问题 I have movies datastore, each record there has its own id as key name like below: 12345 32453 12154 78873 34543 I would like to allow user to browse movies one by one. Firstly, the latest movie should be shown (database has field added with date and time). How to get that from the datastore? Upd. I can do it like below: movies = Movies.query() movies.order(-Movies.added) for movie in movies.fetch(1): self.response.out.write(movie.key.id()) But I don't like it - in order to get key I request

GAE Remote API - Cannot connect

泄露秘密 提交于 2019-12-24 14:31:42
问题 Ok, I'm attempting unsuccessfully to connect to a remote datastore and populate from my local machine using the steps outlined here: https://cloud.google.com/appengine/docs/java/tools/remoteapi#Configuring_Remote_API_on_the_Client public static void main(String[] args) { String username = "myemail@gmail.com"; String password = "mygmailpassword"; RemoteApiOptions options = new RemoteApiOptions() .server("myappname.appspot.com", 443) .credentials(username, password); RemoteApiInstaller

Objectify filter entities with parent key

跟風遠走 提交于 2019-12-24 14:30:45
问题 I have written a piece of code that fetches entities from google datastore by filtering the entity with the supplied parent key. When I run the code I am getting java.lang.IllegalArgumentException . I know the problem is with the way I am creating the parent key, can you please guide me how to effectively create a parent key for this use case? I am getting the below exception in Myservice.java line 8 Method threw 'java.lang.IllegalArgumentException' exception - Class hierarchy for class java

App Engine Errors when trying to insert many entities in bulk with condition that property “UserNo” increases by 1 everytime an entity's inserted

拈花ヽ惹草 提交于 2019-12-24 13:54:07
问题 I want to insert many user entities in bulk. User entity has property Name & UserNo . The requirement is that the property UserNo will automatically increase by 1 every time a User entity was inserted. The following code works fine if I try to insert 1 record at a time. public void insertUser(String name){ Entity userEntity=new Entity("User"); long maxID=Utility.getPropertyMaxID("User", "UserNo")+1; userEntity.setProperty("Name",name); datastore.put(userEntity); } public static long

How to search structured properties ? google app engine

爱⌒轻易说出口 提交于 2019-12-24 13:03:12
问题 I have two models categories and cities: class category(ndb.Model): hidden = ndb.BooleanProperty() categoryName = ndb.StringProperty() class city(ndb.Model): categories = ndb.StructuredProperty(category,repeated = True) cityName = ndb.StringProperty() I have cityEntity: How to return categories list that contain just category.hidden = false ? edit: it's possible to get the categories list, then Loop through the categories list and extract just the categories which not hidden for example I

Can't import Datastore from google.cloud

孤街浪徒 提交于 2019-12-24 11:15:06
问题 I'm trying to create a basic web app using Flask and Google Datastore to make myself to Google Cloud. Though, when I deploy my app, I get an Error 500, the details being that Python can't import Datastore : ImportError: No module named cloud . Here is my app.yaml : runtime: python27 api_version: 1 threadsafe: true handlers: - url: .* script: main.app libraries: - name: jinja2 version: "2.6" - name: markupsafe version: "0.15" - name: flask version: 0.12 My main.py starts like follows: from _