minerva/create_view.sql
2023-07-27 13:58:17 -04:00

12 lines
541 B
SQL

-- auto-generated
CREATE EXTERNAL TABLE IF NOT EXISTS `trajectories`.`kitware_original`
LOCATION 's3://haystac-archive-phase1.trial1/ta1.kitware/ta1/simulation/train/'
TBLPROPERTIES ('table_type' = 'DELTA');
-- view to accomodate for the fact that Athena can't handle timezones
-- required in order to unload the data in any format that's not CSV
create or replace view trajectories.kitware AS
select
agent, from_unixtime(cast(to_unixtime(timestamp) AS bigint)) as timestamp, latitude, longitude
from "trajectories"."kitware_original"