Converting an ndb model to a BigQuery schema

I have been working on the problem of recording changes to an ndb model. One way to accomplish this is to stream data changes to a BigQuery table corresponding to the ndb model. It would be great to do this in a generic way which gives us the problem of generating a BigQuery table given an ndb model. This article will describe one solution to this problem. ...

August 14, 2014 · 3 min · Kevin Sookocheff

Restoring an App Engine backup into a Big Query table

An unfortunate DevOps task for any team running App Engine is restoring data from backups. One way to do this is by accessing the Google Cloud Storage URL for a given App Engine backup and importing that backup into BigQuery. This article will show you to get the Cloud Storage URL for an App Engine backup and manually perform that import. ...

August 4, 2014 · 2 min · Kevin Sookocheff

Bypassing ndb hooks with the RawDatastoreInputReader

When doing a MapReduce operation there are times when you want to edit a set of entities without triggering the post or pre put hooks associated with those entities. On such ocassions using the raw datastore entity allows you to process the data without unwanted side effects. This article will show how to use the RawDatastoreInputReader to process datastore entities. ...

July 29, 2014 · 2 min · Kevin Sookocheff

Generating a C# client for an App Engine Cloud Endpoints API

The Cloud Endpoints API comes packaged with endpointscfg.py to generate client libraries in JavaScript, Objective-C (for iOS) and Java (for Android). You can also generate a few additional client libraries using the Google APIs client generator. This article will show you how to use the generator to create a C# client library. ...

July 22, 2014 · 2 min · Kevin Sookocheff

Using Basic Authentication with Google Cloud Endpoints

Cloud Endpoints provides strong integration with OAuth 2.0. If you can use this integration – do it. However, some legacy systems require supporting alternative authentication mechanisms. This article will show you how to secure an API endpoint using Basic Authentication. You can use this as a starting point for whatever authentication method you choose. ...

July 16, 2014 · 2 min · Kevin Sookocheff

Unit Testing Cloud Endpoints

Writing unit tests for App Engine Cloud Endpoints is a fairly straight forward process. Unfortunately it is not well documented and a few gotchas exist. This article provides a template you can use to unit test Cloud Endpoints including full source code for a working example. ...

July 10, 2014 · 3 min · Kevin Sookocheff

Creating RESTful APIs with App Engine Cloud Endpoints

App Engine Cloud Endpoints is a great way to quickly and easily create JSON API endpoints. What’s not clear is how to structure your Message code to support a RESTful create-read-update-delete (CRUD) API. This article will show the basic CRUD operations for one Resource. The results can easily be adapted to support a full REST API. ...

July 2, 2014 · 3 min · Kevin Sookocheff

Running Multiple App Engine Modules Locally with dev_appserver.py

The recently released App Engine Modules API allows developers to compartmentalize their applications into logical units that can share state using the datastore or memcache. ...

June 17, 2014 · 1 min · Kevin Sookocheff

How to bypass the auto_now property option during an ndb put

In App Engine the auto_now option sets a property to the current date/time whenever the entity is created or updated. This is a great feature for tracking the time when an entity was last updated. However, sometimes you may want to put an entity without updating an auto_now timestamp. This article will show you how. ...

May 28, 2014 · 2 min · Kevin Sookocheff

App Engine MapReduce API - Part 5: Using Combiners to Reduce Data Throughput

View all articles in the MapReduce API Series. So far we’ve looked at using MapReduce pipelines to perform calculations over large data sets and combined multiple pipelines in succession. In this article we will look at how to reduce the amount of data transfer by using a combiner. ...

May 20, 2014 · 4 min · Kevin Sookocheff