April 2017
Beginner to intermediate
360 pages
9h 35m
English
Let's say we want to keep very close track of how many times our user's status updates are viewed by someone else. Status updates may be viewed on the MyStatus website, or using our mobile app, or via a third-party app using our API. We'll want to track that, as well as which status update was viewed and when. To do this, let's create a table to store analytics observations:
CREATE TABLE "status_update_views" ( "status_update_username" text, "status_update_id" timeuuid, "observed_at" timeuuid, "client_type" text, PRIMARY KEY ( ("status_update_username", "status_update_id"), "observed_at" ) );
In this new table, we store a partition for each individual status update, with the full primary ...
Read now
Unlock full access