http://reddit.com/r/all.json?sort=hot&limit=100
Save to directories named after unix timestamp.
CREATE OR REPLACE VIEW reddit_view AS SELECT
`id`,
CAST(`to_timestamp`(CAST(`dir0` AS BIGINT)) AS TIMESTAMP) AS `collected`,
CAST(`to_timestamp`(CAST(CAST(`created` AS FLOAT) AS BIGINT)) AS TIMESTAMP) AS `posted`,
(CAST(`dir0` AS BIGINT) - CAST(CAST(`created_utc` AS FLOAT) AS BIGINT)) / 60 AS `age_mins`,
`subreddit`,
`title`,
`url`,
`domain`,
CAST(`rank` AS INTEGER) AS `rank`,
CAST(`score` AS BIGINT) AS `score`,
CAST(`ups` as BIGINT) as `ups`,
CAST(`downs` as BIGINT) as `downs`,
CAST(`num_comments` AS INTEGER) AS `num_comments`,
CAST(`is_self` AS BOOLEAN) AS `is_self`
FROM `maprfs`.`cmatta`.`reddit/data`