### snowflake cursor doesn't support string sseparation, thus this var is adjusted sf_check_3 = """select count(*) "count", 'src; SF raw' \ from "DELPHI_EXPLORATION"."RAW"."TIKTOK_TRENDS_DAILY" \ where REPORT_DATE >= dateadd(d, -1*240, current_date()) \ union \ select count(*) "count", 'tgt; SF main' \ from "DELPHI_EXPLORATION"."MAIN"."TIKTOK_TRENDS_DAILY" \ where REPORT_DATE in (select distinct REPORT_DATE \ from "DELPHI_EXPLORATION"."RAW"."TIKTOK_TRENDS_DAILY" \ where REPORT_DATE >= dateadd(d, -1*240, current_date()));""" sf_check_4 = """select \ report_dates.DATE "date" \ ,ifs.DISASSEMBLE_CONTENT_STATUS_ID "cs_id" \ ,ifs.INGESTION_COMPLETED \ ,ifs.TOTAL_FILE_ROW_COUNT "src" \ ,raw.TOTAL_FILE_ROW_COUNT "dest_raw" \ ,main.TOTAL_FILE_ROW_COUNT "dest_main" \ from "DELPHI_EXPLORATION"."SYS"."INBOUND_FILE_STATUS" ifs \ left outer join ( \ select \ DISASSEMBLE_CONTENT_STATUS_ID \ ,count (*) "TOTAL_FILE_ROW_COUNT" \ from "DELPHI_EXPLORATION"."RAW"."TIKTOK_TRENDS_DAILY" \ group by DISASSEMBLE_CONTENT_STATUS_ID \ ) raw on raw.DISASSEMBLE_CONTENT_STATUS_ID = ifs.DISASSEMBLE_CONTENT_STATUS_ID \ left outer join ( \ select \ DISASSEMBLE_CONTENT_STATUS_ID \ ,count (*) "TOTAL_FILE_ROW_COUNT" \ from "DELPHI_EXPLORATION"."MAIN"."TIKTOK_TRENDS_DAILY" \ group by DISASSEMBLE_CONTENT_STATUS_ID \ ) main on main.DISASSEMBLE_CONTENT_STATUS_ID = ifs.DISASSEMBLE_CONTENT_STATUS_ID \ right outer join ( \ select dateadd(dd, -3, current_date()) "DATE" \ union select dateadd(dd, -4, current_date()) \ union select dateadd(dd, -5, current_date()) \ union select dateadd(dd, -6, current_date()) \ union select dateadd(dd, -7, current_date()) \ union select dateadd(dd, -8, current_date()) \ union select dateadd(dd, -9, current_date()) \ union select dateadd(dd, -10, current_date()) \ union select dateadd(dd, -11, current_date()) \ union select dateadd(dd, -12, current_date()) \ union select dateadd(dd, -13, current_date()) \ union select dateadd(dd, -14, current_date()) \ union select dateadd(dd, -15, current_date()) \ union select dateadd(dd, -16, current_date()) \ ) report_dates on report_dates.DATE = ifs.REPORT_DATE \ where true \ and datediff('DAY', ifs.REPORT_DATE, current_date()-3) < 14 \ and ifs.dsp = 'TIKTOKREPORTING' \ order by report_dates.date desc;""" if __name__ == '__main__': pass