This file contains 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
-- choose. the region DEFAULT: us | |
-- choose the time window start_time and end_time and | |
-- choose if it's in a DAY or HOUR level aggregation of results | |
-- set the project-id and run from the project where the reservation is defined | |
DECLARE SE_PRICE FLOAT64 DEFAULT 0.04; | |
DECLARE PAYG_PRICE FLOAT64 DEFAULT 0.06; | |
DECLARE start_time DEFAULT TIMESTAMP('2023-05-01 07:00:00'); | |
DECLARE end_time DEFAULT TIMESTAMP('2023-06-30 07:00:00'); |
This file contains 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
-- run from the project where the reservation is defined | |
-- choose. the region DEFAULT: us | |
-- choose the time window dt_start and dt_end | |
-- set the project id | |
DECLARE | |
dt_start DEFAULT TIMESTAMP('2023-05-01 00:00:00'); | |
DECLARE | |
dt_end DEFAULT TIMESTAMP('2023-05-01 23:59:00'); | |
--SET @@dataset_project_id = 'my-project-id'; |
This file contains 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
-- set the region, DEFAULT: us | |
-- set the time window dt_start and dt_end | |
-- set the project 'dataset_project_id' in case running in a different project (i.e. admin) | |
DECLARE | |
dt_start DEFAULT TIMESTAMP("2023-03-01 00:00:00") ; | |
DECLARE | |
dt_end DEFAULT TIMESTAMP("2023-05-31 23:59:59"); | |
--SET @@dataset_project_id = 'my-project-id'; | |
WITH |
This file contains 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
-- choose. the region DEFAULT: us | |
-- choose the time window dt_start and dt_end | |
-- In case it's not the current project set the dataset_project_id to the relevant project | |
DECLARE current_on_demand_price_per_tb INT64 DEFAULT 5; | |
DECLARE new_on_demand_price_per_tb FLOAT64 DEFAULT 6.25; | |
DECLARE standard_edition_price FLOAT64 DEFAULT 0.04; | |
DECLARE standard_edition_factor FLOAT64 DEFAULT 1.5; |