Skip to content

Instantly share code, notes, and snippets.

@conorbmurphy
Created July 17, 2017 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conorbmurphy/bf4d6b2b10eb7ea1652b33518379bb41 to your computer and use it in GitHub Desktop.
Save conorbmurphy/bf4d6b2b10eb7ea1652b33518379bb41 to your computer and use it in GitHub Desktop.
DROP KEYSPACE IF EXISTS plume;
CREATE KEYSPACE plume WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
use plume;
create type plume.pollution_data (
value_upm float,
pi float,
aqi float,
aqi_cn float
);
create table plume.pollution_data_by_lat_lon (
latitude double,
longitude double,
timestamp bigint,
pm_data frozen <pollution_data>,
nitrous_data frozen <pollution_data>,
pm_data_ten frozen <pollution_data>,
pm_data_twenty_five frozen <pollution_data>,
ozone_data frozen <pollution_data>,
overall_data frozen <pollution_data>,
primary key ((latitude, longitude), timestamp)
)
with clustering order by (timestamp desc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment