Skip to main content


How to query data using GQL if your Kind name has a dot in it?

There is a big chance that your kind (table) name is of the format . because there are various tables in your module.

e.g. I had StoreService.Store and StoreService.Employee as two of the kinds in my service named StoreService.

In Google Cloud Console, if you write a GQL to query to fetch/filter the entities you will get an error:

SELECT * from StoreService.Store
GQL query error: Encountered "." at line 1, column 27. Was expecting one of: "group", "limit", "offset", "order", "where"

Enclosing the Kind name in single quotes doesn't help either:

SELECT * from 'StoreService.Store'
GQL query error: Encountered "'StoreService.Store'" at line 1, column 15. Was expecting one of: ,

To do it right, you need to enclose the name in backquotes (that key below ~ in the keyboard)!!!
SELECT * from `StoreService.Store`

This information is hidden in Datastore documentation here. Try finding it!

Recent posts

How to transfer data from Cloud Datastore to Big Query in Google Cloud Platform

If you are here I am assuming that you are looking to migrate the data from Cloud Datastore to Big Query because you want to do some analysis and are frustrated by limitations imposed by GQL (Google Query Language).

First of all you need to create a backup of the data in datastore. Use the Datastore Admin tool provided by Google to take a backup and store it automatically in the Cloud Storage bucket.

Select all the entities and press 'Backup Entities'. Give a backup name, select Google Cloud Storage as backup storage destination and specify a bucket name.

Once the backup job is completed, you will see the backup listed. You can select a backup and press 'Info' and see the details (Entities are masked in the screenshot below).

Go to the bucket mentioned in 'Handle' and you will see the file mentioned above. You will also see many more files with similar names, ending with .backup_info (e.g. ahRzfmpkYS1wZC1zbG8tc2FuZGJveHJBCxIcX0FFX0RhdGFzdG9yZUFkbWluX09wZXJhdGl…

How to upload to Google Cloud Storage buckets using CURL

Signed URLs are pretty nifty feature given by Google Cloud Platform to let anyone access your cloud storage (bucket or any file in the bucket) without need to sign in.

Official documentation gives step by step details as to how to read/write to the bucket using gsutil or through a program. This article will tell you how to upload a file to the bucket using curl so that any client which doesn't have cloud SDK installed can do this using a simple script. This command creates a signed PUT URL for your bucket. gsutil signurl -c 'text/plain' -m PUT serviceAccount.json gs://test_bucket_location
Here is my URL:…

How to update git remote origin URL

OK, whatever way you are passionate about when it comes to updating your remote origin URLs, I have got you covered!
Option 1: Go to config file in /.git folder.      change url field from      url = ssh://git@<old-url> to url = ssh://git@<new-url>
Option 2: Go to your repo location, on cmd give git remote set-url origin ssh://git@<new-url>. 
Option 3: Go to your repository in source tree, click on settings, on Remotes tab in repository settings box, you can select the origin and edit.

What is life without options!!

Uploading and Retrieving images on Google Cloud Storage

You would already be aware that there are multiple options given by Google Cloud Platform to store data. Here is Google documentation on when to use which option: Google recommends using Google Cloud Storage (GCS) to store static content like files/videos etc. There is something called 'Blobstore' as well which is also used to store such content but it is on the way to being deprecated. This page talks about using GCS to store images. Look at this page to understand basic requirements for setup of GCS. In the Cloud Store Browser below following buckets are already available. If you select any bucket, you would be able to see the objects created in it.  Here you can see the image file in the '' bucket. You won't be able to add/delete files or folder from the browser if you don't have proper access but through code (running with the service account) it should not be a problem. Objects on GCS are immutable so you can't edit an ob…