Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
106 lines (105 sloc) 3.5 KB
create or replace table ridehistory (
vendor_id string,
pickup_datetime timestamp,
dropoff_datetime timestamp,
store_and_fwd_flag string,
rate_code_id smallint,
pickup_longitude decimal(18,14),
pickup_latitude decimal(18,14),
dropoff_longitude decimal(18,14),
dropoff_latitude decimal(18,14),
passenger_count smallint,
trip_distance decimal(6,3),
fare_amount decimal(6,2),
extra decimal(6,2),
mta_tax decimal(6,2),
tip_amount decimal(6,2),
tolls_amount decimal(6,2),
ehail_fee decimal(6,2),
improvement_surcharge decimal(6,2),
total_amount decimal(6,2),
payment_type string,
trip_type smallint,
pickup string,
dropoff string,
cab_type string,
precipitation smallint,
snow_depth smallint,
snowfall smallint,
max_temperature smallint,
min_temperature smallint,
average_wind_speed smallint,
pickup_nyct2010_gid smallint,
pickup_ctlabel string,
pickup_borocode smallint,
pickup_boroname string,
pickup_ct2010 string,
pickup_boroct2010 string,
pickup_cdeligibil string,
pickup_ntacode string,
pickup_ntaname string,
pickup_puma string,
dropoff_nyct2010_gid smallint,
dropoff_ctlabel string,
dropoff_borocode smallint,
dropoff_boroname string,
dropoff_ct2010 string,
dropoff_boroct2010 string,
dropoff_cdeligibil string,
dropoff_ntacode string,
dropoff_ntaname string,
dropoff_puma string
)
AS
select
$1:vendor_id::string,
$1:pickup_datetime::timestamp,
$1:dropoff_datetime::timestamp,
$1:store_and_fwd_flag::string,
$1:rate_code_id::smallint,
$1:pickup_longitude::decimal(18,14),
$1:pickup_latitude::decimal(18,14),
$1:dropoff_longitude::decimal(18,14),
$1:dropoff_latitude::decimal(18,14),
$1:passenger_count::smallint,
$1:trip_distance::decimal(6,3),
$1:fare_amount::decimal(6,2),
$1:extra::decimal(6,2),
$1:mta_tax::decimal(6,2),
$1:tip_amount::decimal(6,2),
$1:tolls_amount::decimal(6,2),
$1:ehail_fee::decimal(6,2),
$1:improvement_surcharge::decimal(6,2),
$1:total_amount::decimal(6,2),
$1:payment_type::string,
$1:trip_type::smallint,
$1:pickup::string,
$1:dropoff::string,
$1:cab_type::string,
$1:precipitation::smallint,
$1:snow_depth::smallint,
$1:snowfall::smallint,
$1:max_temperature::smallint,
$1:min_temperature::smallint,
$1:average_wind_speed::smallint,
$1:pickup_nyct2010_gid::smallint,
$1:pickup_ctlabel::string,
$1:pickup_borocode::smallint,
$1:pickup_boroname::string,
$1:pickup_ct2010::string,
$1:pickup_boroct2010::string,
$1:pickup_cdeligibil::string,
$1:pickup_ntacode::string,
$1:pickup_ntaname::string,
$1:pickup_puma::string,
$1:dropoff_nyct2010_gid::smallint,
$1:dropoff_ctlabel::string,
$1:dropoff_borocode::smallint,
$1:dropoff_boroname::string,
$1:dropoff_ct2010::string,
$1:dropoff_boroct2010::string,
$1:dropoff_cdeligibil::string,
$1:dropoff_ntacode::string,
$1:dropoff_ntaname::string,
$1:dropoff_puma::string
from taxirides.public.test;
You can’t perform that action at this time.