Created
June 30, 2022 18:57
-
-
Save vvgsrk/8877c933b22f575f5023826495dc1794 to your computer and use it in GitHub Desktop.
Create a separate secondary database for refresh
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
-- A separate new database | |
CREATE DATABASE refresh_secondary_database; | |
-- Create a new schema | |
CREATE SCHEMA refresh_secondary_database.amadeus_dynamic_pricing; | |
-- Task that refreshes the secondary database on a schedule | |
CREATE OR REPLACE TASK refresh_secondary_database.amadeus_dynamic_pricing.dynamic_pricing_data_refresh_task | |
WAREHOUSE = WH01_XS | |
SCHEDULE = 'USING CRON 0 3 * * * UTC' | |
AS | |
ALTER DATABASE AMADEUS_DYNAMIC_PRICING REFRESH | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment