I have a snowflake model in which a lot of source tables are loaded in different hours of each day. A standard processing with streams, tasks, etc. loads that data into 4 final tables, tx_1, tx_2, tx_3 and tx_4.
Now the users are requesting that wants to create another final table that is loaded when all the previous 4 final tables are loaded through each process date (because they need to join this 4 tables).
What i have so far is that i created and additional root task replacing the previous root tasks (one for each data source), this root task has the condition of, when any of the source tables streams has data (using OR condition), all the next level tasks are triggered, but how in one period of time, only one of this streams is going to have data, only one of those child tasks is going to proceed.
Finally i added one final task that is triggered when all the previous final tasks are executed.
I tested loading data and all of this “final” tasks that loads the data on each of those 4 tables are working fine, but the thing is this new final task, that depends on the execution of all this previous tasks, is never triggered. I’m not a specialist but i’m assuming is because for this to happens, all the tasks should be executed in the same task root execution, and this is never gonna happen because as i state before, the data is loaded through all day.
Is like i need to keep track of each of this tasks executions and when at least 1 execution for each one happened, the final task is triggered. I would love to do this without the need of creating another table or something like that.
Any thoughts on what can i do??