Skip to content

Commit

Permalink
Merge pull request #390 from aws-samples/athena_v3
Browse files Browse the repository at this point in the history
Athena v3 compatibility fix
  • Loading branch information
yprikhodko authored Oct 24, 2022
2 parents 170f33f + 16bdd99 commit f5ec4d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cid/builtin/core/data/queries/cid/ri_sp_mapping_ri.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
WHEN ("reservation_reservation_a_r_n" <> '') THEN "reservation_reservation_a_r_n"
ELSE '' END "ri_sp_arn_mapping"
, CASE
-- WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(from_iso8601_timestamp("savings_plan_end_time") AS timestamp)
WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(from_iso8601_timestamp("reservation_end_time") AS timestamp)
-- WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(CAST(from_iso8601_timestamp("savings_plan_end_time") AS date) AS timestamp)
WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(CAST(from_iso8601_timestamp("reservation_end_time") AS date) AS timestamp)
ELSE NULL END "ri_sp_end_date"
FROM
"${cur_table_name}"
Expand Down
4 changes: 2 additions & 2 deletions cid/builtin/core/data/queries/cid/ri_sp_mapping_sp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
-- WHEN ("reservation_reservation_a_r_n" <> '') THEN "reservation_reservation_a_r_n"
ELSE '' END "ri_sp_arn_mapping"
, CASE
WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(from_iso8601_timestamp("savings_plan_end_time") AS timestamp)
-- WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(from_iso8601_timestamp("reservation_end_time") AS timestamp)
WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(CAST(from_iso8601_timestamp("savings_plan_end_time") AS date) AS timestamp)
-- WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(CAST(from_iso8601_timestamp("reservation_end_time") AS date) AS timestamp
ELSE NULL END "ri_sp_end_date"
FROM
"${cur_table_name}"
Expand Down
4 changes: 2 additions & 2 deletions cid/builtin/core/data/queries/cid/ri_sp_mapping_sp_ri.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN "savings_plan_savings_plan_a_r_n"
WHEN ("reservation_reservation_a_r_n" <> '') THEN "reservation_reservation_a_r_n"ELSE '' END "ri_sp_arn_mapping"
, CASE
WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(from_iso8601_timestamp("savings_plan_end_time") AS timestamp)
WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(from_iso8601_timestamp("reservation_end_time") AS timestamp) ELSE NULL END "ri_sp_end_date"
WHEN ("savings_plan_savings_plan_a_r_n" <> '') THEN CAST(CAST(from_iso8601_timestamp("savings_plan_end_time") AS date) AS timestamp)
WHEN ("reservation_reservation_a_r_n" <> '' AND "reservation_end_time" <> '') THEN CAST(CAST(from_iso8601_timestamp("reservation_end_time") AS date) AS timestamp) ELSE NULL END "ri_sp_end_date"
FROM
"${cur_table_name}"
WHERE (("line_item_line_item_type" = 'RIFee') OR ("line_item_line_item_type" = 'SavingsPlanRecurringFee'))
Expand Down

0 comments on commit f5ec4d6

Please sign in to comment.