Created
July 17, 2017 17:56
-
-
Save conorbmurphy/bf4d6b2b10eb7ea1652b33518379bb41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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