BankOrg Data Platform / Data Engineering / RAW Ingestion
Daily Load Tasks
The four daily tasks that load the previous day of each core banking feed into RAW.
One task per feed loads the previous business day into RAW. The four tasks are created by snowflake/17_create_raw_tasks.sql in PRD_RAW.OPS. Each one calls the procedure OPS.LOAD_DATASET with its job name and the date to load.
Tasks
| Task | Job in OPS.LOAD_JOB_CONFIG | Target table |
|---|---|---|
| LOAD_BRANCHES_TASK | LOAD_BRANCHES | PRD_RAW.CORE_BANKING.BRANCHES |
| LOAD_CUSTOMERS_TASK | LOAD_CUSTOMERS | PRD_RAW.CORE_BANKING.CUSTOMERS |
| LOAD_ACCOUNTS_TASK | LOAD_ACCOUNTS | PRD_RAW.CORE_BANKING.ACCOUNTS |
| LOAD_TRANSACTIONS_TASK | LOAD_TRANSACTIONS | PRD_RAW.CORE_BANKING.TRANSACTIONS |
All four run at 05:00 Vietnam time (Asia/Ho_Chi_Minh) on the warehouse LOAD_WH.
Create the tasks
The task passes the date to load: yesterday in Vietnam time, so the run of 2026-10-19 loads the folder snapshot_date=2026-10-18. The procedure applies no offset itself. The task below is LOAD_BRANCHES_TASK; the other three differ only in the task name, the comment and the job name.
USE ROLE SYSADMIN;
USE DATABASE PRD_RAW;
USE SCHEMA OPS;
CREATE OR REPLACE TASK LOAD_BRANCHES_TASK
WAREHOUSE = LOAD_WH
SCHEDULE = 'USING CRON 0 5 * * * Asia/Ho_Chi_Minh'
COMMENT = 'Daily load of RAW.CORE_BANKING.BRANCHES (job LOAD_BRANCHES)'
AS
CALL OPS.LOAD_DATASET('LOAD_BRANCHES', DATEADD(day, -1, CONVERT_TIMEZONE('Asia/Ho_Chi_Minh', CURRENT_TIMESTAMP())::DATE));When the marker file is missing or the load fails, the procedure raises an error and the task run shows as failed in the task history. The tasks do not retry themselves.
Grant the task privilege
SYSADMIN owns the tasks, so it needs the account-level EXECUTE TASK privilege, granted once by ACCOUNTADMIN.
USE ROLE ACCOUNTADMIN;
GRANT EXECUTE TASK ON ACCOUNT TO ROLE SYSADMIN;
USE ROLE SYSADMIN;Resume the tasks
Tasks are created suspended. Resume the four tasks to start the daily schedule.
ALTER TASK LOAD_BRANCHES_TASK RESUME;
ALTER TASK LOAD_CUSTOMERS_TASK RESUME;
ALTER TASK LOAD_ACCOUNTS_TASK RESUME;
ALTER TASK LOAD_TRANSACTIONS_TASK RESUME;Check a run
Each run is one row in OPS.LOAD_LOG. The task run itself is in the task history.
SELECT * FROM OPS.LOAD_LOG ORDER BY LOG_ID DESC;
SELECT * FROM TABLE(INFORMATION_SCHEMA.TASK_HISTORY(TASK_NAME => 'LOAD_BRANCHES_TASK'))
ORDER BY SCHEDULED_TIME DESC;