We load data into certain Snowflake tables daily. I want to update a PDT only when both tables have been loaded for the day. To update the PDT when either table has been loaded, I use
sql_trigger_value:
select sum(c)from(
select count(*) c from TABLE1
union all
select count(*) from TABLE2
)
;;
(And other solutions exist.) But how do I update the PDT when both tables have been loaded? Assume that at least one of the tables has no column whose value can be used for this purpose (like a timestamp).