Last active
July 28, 2021 14:09
-
-
Save vvgsrk/dd6533054781c362ad7fbfde4ae46502 to your computer and use it in GitHub Desktop.
Materialized view for infare external table
This file contains hidden or 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
CREATE OR REPLACE MATERIALIZED VIEW dp_prod.dm_rmp.infare | |
COMMENT = 'Materialized view for infare external table' | |
CLUSTER BY (observation_date) | |
AS | |
SELECT | |
id, | |
observation_date, | |
observation_time, | |
pos, | |
origin, | |
destination, | |
is_one_way, | |
outbound_travel_stop_over, | |
inbound_travel_stop_over, | |
carrier, | |
outbound_flight_no, | |
inbound_flight_no, | |
outbound_departure_date, | |
outbound_departure_time, | |
outbound_arrival_date, | |
outbound_arrival_time, | |
inbound_departure_date, | |
inbound_departure_time, | |
inbound_arrival_date, | |
inbound_arrival_time, | |
outbound_fare_basis, | |
inbound_fare_basis, | |
outbound_booking_class, | |
inbound_booking_class, | |
price_exc, | |
price_inc, | |
tax, | |
currency, | |
source, | |
price_outbound, | |
price_inbound, | |
is_tax_inc_outin, | |
search_class, | |
outbound_fare_family, | |
inbound_fare_family, | |
outbound_seats, | |
inbound_seats, | |
min_stay, | |
outbound_flight_duration, | |
inbound_flight_duration, | |
observation_datetime, | |
outbound_departure_datetime, | |
outbound_arrival_datetime, | |
inbound_departure_datetime, | |
inbound_arrival_datetime, | |
observation_timeint, | |
outbound_departure_timeint, | |
outbound_arrival_timeint, | |
inbound_departure_timeint, | |
inbound_arrival_timeint, | |
type, | |
subscription_type, | |
dow_outbound, | |
dow_name_outbound, | |
dow_inbound, | |
dow_name_inbound, | |
outbound_stopovers_count, | |
inbound_stopovers_count, | |
outbound_departure_year_month, | |
inbound_departure_year_month, | |
days_before_departure, | |
airport_od, | |
source_file_name, | |
source_file_date, | |
source_file_datetime | |
FROM dp_prod.raw_rmp.infare_external_table; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment