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
-- Initialize OPPORTUNITIES table in Production | |
CREATE OR REPLACE TABLE "LAKE_OF_DATA"."PRODUCTION"."OPPORTUNITIES" CLONE "LAKE_OF_DATA"."STAGING"."OPPORTUNITIES"; | |
-- Initialize OPPORTUNITIES_HISTORY table | |
CREATE OR REPLACE TABLE "LAKE_OF_DATA"."PRODUCTION"."OPPORTUNITIES_HISTORY" AS | |
SELECT CURRENT_DATE as DATE_FROM,NULL::DATE as DATE_TO,1::BOOLEAN as IS_ACTIVE,OPPID::TEXT as OPPID, OPP_NAME,CLOSE_DATE::DATE as CLOSE_DATE,OWNER,ACCOUNT,AMOUNT | |
from "LAKE_OF_DATA"."STAGING"."OPPORTUNITIES"; | |
--Create Stream to track changes | |
create or replace stream opportunity_stream on table "LAKE_OF_DATA"."PRODUCTION"."OPPORTUNITIES"; |
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 TABLE DBUSERS ( | |
NAME VARCHAR, | |
CREATED_ON TIMESTAMP_LTZ, | |
LOGIN_NAME VARCHAR, | |
DISPLAY_NAME VARCHAR, | |
FIRST_NAME VARCHAR, | |
LAST_NAME VARCHAR, | |
EMAIL VARCHAR, | |
MINS_TO_UNLOCK VARCHAR, | |
DAYS_TO_EXPIRY VARCHAR, |
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
#!/bin/sh | |
################# | |
# ZeroC0D3 Team # | |
################# | |
### STEP ### | |
# 1) Download binary file "sqlite3" from | |
# https://www.sqlite.org/ | |
# 2) Extract binary "sqlite3" to your PATH_BIN | |
# 3) Set your file name in PATH_TARGET_DUMP for all schema & data |