FAQ Database Discussion Community


Getting timestamp from Objecify entity?

objectify,google-datastore,optimistic-locking,google-cloud-datastore
Is it possible to obtain the timestamp that is used for optimistic concurrency control from an Objectify entity (or a lower-level part of the Google Datastore infrastructure) and if so, how?

How to upload images and storing it in db google app engine

python,google-app-engine,google-datastore
Hello i want to know how to upload a picture from the user and store it in data base using this form ( using google data store) <form method='post'> <input type='file' name='img'> <input type='submit'> i have made a db model from google.appengine.ext import db class Photo(db.model): profile_pic = db.BlobProperty() and...

Google datastore multiple values for the same property

android,google-app-engine,gae-datastore,google-datastore
I am using Google Datastore for an Android application, the backend is written in Java. In one table, I want to set multiple values to the same property: Entity newGroup = new Entity("group"); newGroup.setProperty("member", "A"); newGroup.setProperty("member", "B"); newGroup.setProperty("member", "C"); datastore.put(newGroup); I then want to query to find all groups a...

Where is data stored when installed while logged on to a Google Cloud Compute instance?

gae-datastore,google-datastore,gcloud
I'm following this tutorial to get started with the Google Cloud Datastore: https://cloud.google.com/datastore/docs/getstarted/start_java/. At this point I have my Cloud account all set up with the APIs needed to use Datastore and Endpoints for a project I am working on. I was following the setup instructions and so far I...

Google DataStore PHP GDS fetchPage from record

php,google-datastore
PHP-GDS provides the following method: $obj_store->fetchPage(10); // Gets the first 10 books However this only works within the same connection, I'd like to use something like: $obj_store->fetchPage(n, 10); so I can get a set of items from separate API calls, e.g.: api.php?page=1&items=10 // items 0-10 api.php?page=2&items=10 // items 11-20 api.php?page=3&items=10...

Google Cloud BigTable vs App Engine Datastore

google-app-engine,google-datastore,google-cloud-bigtable
What is the difference between Google Cloud Bigtable and Google Datastore / App engine datastore, and what are the main practical advantages/disadvantages? AFAIK the Google Datastore is build on top of bigtable.

Google App Engine - ByteString query fails

google-app-engine,go,gae-datastore,google-datastore
I am working on a Go application in which I have an Entity with a Property that holds an identifying token which is a random string of bytes. I am storing this property as a ByteString, and in my development environment I have been able to query for this property...

Google Datastore app architecture questions

google-app-engine,transactions,google-datastore
I'm working on a Google AppEngine app connecting to the Google Cloud Datastore via its JSON API (I'm using PHP). I'm reading all the documentation provided by Google and I still have questions: In the documentation about Transactions, there is the following mention: "Transactions must operate on entities that belong...

Connecting to Google Datastore using gcloud

google-datastore,gcloud-python
I am trying to connect to my Google Datastore instance but I can't find any sample code for how to initialize a connection! Gcloud's main documentation immediately starts with how to assign an Entity or a Query but skips the crucial connection bit. The demo section seems specific to the...

Google NDB: How to Make a Keys Only Query By Id

python,google-app-engine,google-datastore
Id like to check whether an entity still exist in a NDB DataStore. I have the Entity's ID and I do not this operation to count as a read operation but I can't see how to make a keys_only = True query while using get_by_id

Unmarshal datastore.ByteString go

google-app-engine,go,google-datastore
Hi im trying to unmarshal datastore entity that contain ByteString field. But i'm getting unmarshal error, i can't figure out a way to unmarshal it Should i create my own PropertyLoadSaver ?? json: cannot unmarshal string into Go value of type datastore.ByteString package main import ( "encoding/json" "fmt" "google.golang.org/appengine/datastore" )...

Migration from Google cloud sql to datastore

gae-datastore,google-cloud-sql,google-datastore
Is there an easy way to migrate a large (100G) Google cloud sql database to Google datastore? The way that comes to mind is to write a python appengine script for each database and table and then put it into the datastore. That sounds tedious but maybe it has to...

Objectify transaction rollback not happening

gae-datastore,objectify,google-datastore
When I intentionally throw an exception within an Objectify transaction, my transaction is not being rolled back. What am I doing wrong? @Inject Dao dao ... public void testTransaction(){ dao.transact(new VoidWork() { @Override public void vrun() { Key aclKey= dao.save().entity(acl).now(); //expecting this to be rolled back //throw exception if(true) throw...

Generate unique Long Id on App Engine

google-app-engine,objectify,google-datastore
I've three possible ways user can sign in into our service: login and password Google+ Facebook I want to keep all those user id's in one entity. To avoid id collisions between e.g. Google and Facebook a prefix will be added to id (g- and f- respectively). Currently for users...

How to create multiple entities dynamically in google app engine using google data storage(python)

python,google-app-engine,google-datastore
I wish to implement this: There should be an entity A with column 1 having values a,b,c...[dynamically increases by user's input] There should be another entity B for each values of a , b , c.. How should I approach this problem? Should I dynamically generate other entities as user...

Use Google App Engine's NDB as a message queue?

google-app-engine,message-queue,app-engine-ndb,google-datastore
Has anyone tried to use NDB as a message queue? We have several consumers and producers, which may want to do broadcast, multicast, and publish-subscribe. I've read several documents on why using a RDBMS as a message queue is bad. But in my case, my app can tolerate latency of...

Weird datastore error in Go, “The kind is the empty string”

google-app-engine,go,google-datastore
I am recently getting an error that I have never seen before when making a simple datastore.GetAll() request. I can't figure out what it means and I can't find any documentation with the error message or any help from Googleing the error message. Here's my code: type MyUnderlyingStruct struct {...

Using App Engine Cloud Endpoints to access ndb datastore

python,google-app-engine,google-cloud-endpoints,webapp2,google-datastore
I'm sorry if this question is redundant or not well-conceived, but I am new to App Engine, and I'm not sure about the best practices for what I'm attempting to do. I have an iOS app, and I want to use http GET and POST requests to put and query...

Accessing specific part of object

php,google-app-engine,google-datastore
I have an object I am trying to access and this is the var_dump() object(GDS\Entity)#16 (5) { ["str_kind":"GDS\Entity":private]=> string(13) "User Sessions" ["str_key_id":"GDS\Entity":private]=> string(16) "5649391675244544" ["str_key_name":"GDS\Entity":private]=> NULL ["mix_ancestry":"GDS\Entity":private]=> NULL ["arr_data":"GDS\Entity":private]=> array(1) { ["session_id"]=> string(3) "123" } } I know if I wanted to get the session_id and this object was stored...

Export Google Cloud Datastore and import to BigQuery programmatically

gae-datastore,google-bigquery,google-datastore
I'm looking for a method to export my Cloud DataStore and import it into Big Query daily. The manual way is described at google page. I do not find a clean way to automate it.

Managing users authentication in Google App Engine

python,google-app-engine,google-api,google-datastore
I am working on a webapp based on google app engine. The application uses the google authentication apis. Basically every handler extends from this BaseHandler and as first operation of any get/post the checkAuth is executed. class BaseHandler(webapp2.RequestHandler): googleUser = None userId = None def checkAuth(self): user = users.get_current_user() self.googleUser...