-- Daily task to generate hook recommendation quality scores
-- Runs every day at 2:00 AM UTC to process the previous day's data

CREATE OR REPLACE TASK clip_rec_quality_score_daily_insert
  WAREHOUSE = 'SUNO_PROD_LARGE_CLIP_REC_QUALITY_SCORE_DAILY'
  SCHEDULE = 'USING CRON 0 2 * * * UTC'  -- Run daily at 2:00 AM UTC
  COMMENT = 'Daily task to calculate and insert hook recommendation quality scores'
AS
BEGIN
CALL clip_rec_quality_score_daily_insert_proc(
    CURRENT_DATE()
);
call TASK_MONITOR_INSERT_PROC('CLIP_REC_QUALITY_SCORE_DAILY_INSERT', CURRENT_TIMESTAMP(), 1, 'SUCCESS', 'DAILY');
END;
