Skip to content

Commit

Permalink
test 1
Browse files Browse the repository at this point in the history
  • Loading branch information
rymarczy committed Dec 12, 2023
1 parent d78b620 commit 31bb871
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python_src/src/lamp_py/tableau/jobs/rt_rail.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def __init__(self) -> None:
" , TIMEZONE('America/New_York', TO_TIMESTAMP(ve.vp_move_timestamp)) as previous_stop_departure_datetime"
" , TIMEZONE('America/New_York', TO_TIMESTAMP(COALESCE(ve.vp_stop_timestamp, ve.tu_stop_timestamp))) as stop_arrival_datetime"
" , TIMEZONE('America/New_York', TO_TIMESTAMP(COALESCE(ve.vp_stop_timestamp, ve.tu_stop_timestamp) + ve.dwell_time_seconds)) as stop_departure_datetime"
" , (ve.vp_move_timestamp - extract(epoch FROM date(vt.service_date::text)::timestamp WITH TIME ZONE AT TIME ZONE 'UTC'))::int as previous_stop_departure_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM date(vt.service_date::text)::timestamp WITH TIME ZONE AT TIME ZONE 'UTC') + ve.travel_time_seconds)::int as stop_arrival_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM date(vt.service_date::text)::timestamp WITH TIME ZONE AT TIME ZONE 'UTC') + ve.travel_time_seconds + ve.dwell_time_seconds)::int as stop_departure_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM vt.service_date::text::timestamp WITH TIME ZONE AT TIME ZONE 'America/New_York'))::int as previous_stop_departure_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM vt.service_date::text::timestamp WITH TIME ZONE AT TIME ZONE 'UTC'))::int as utc_previous_stop_departure_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM vt.service_date::text::timestamp WITH TIME ZONE AT TIME ZONE 'America/New_York') + ve.travel_time_seconds)::int as stop_arrival_sec"
" , (ve.vp_move_timestamp - extract(epoch FROM vt.service_date::text::timestamp WITH TIME ZONE AT TIME ZONE 'America/New_York') + ve.travel_time_seconds + ve.dwell_time_seconds)::int as stop_departure_sec"
" , vt.direction_id::int"
" , vt.route_id"
" , vt.branch_route_id"
Expand Down Expand Up @@ -118,6 +119,7 @@ def parquet_schema(self) -> pyarrow.schema:
("stop_arrival_datetime", pyarrow.timestamp("us")),
("stop_departure_datetime", pyarrow.timestamp("us")),
("previous_stop_departure_sec", pyarrow.int64()),
("utc_previous_stop_departure_sec", pyarrow.int64()),
("stop_arrival_sec", pyarrow.int64()),
("stop_departure_sec", pyarrow.int64()),
("direction_id", pyarrow.int8()),
Expand Down

0 comments on commit 31bb871

Please sign in to comment.