I’m trying to create an airflow dag that runs an sql query to get all of yesterday’s data, but I want the execution date to be delayed from the data_interval_end.
So the data interval is ending at midnight, but it takes few hours for the data itself to be ready for querying. This is why I want the dag to run only after 4 hours.
For example:
data_interval_start = 2022-01-01 00:00:00
data_interval_end = 2022-01-02 00:00:00
wanted dag execution = 2022-01-02 00:04:0
How can I achieve this? Thanks!
So far I just adjusted the sql query itself with date_trunc, but I hope there is a solution to keep the query without this function.