Sensor to trigger materialization of partitioned dbt assets #22445
Unanswered
fredonia88
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a sensor that queries a redshift table for a new date based on a daily partition definition. If the date is found, it triggers a run request for a dbt job that materializes two dbt partitioned assets.
However, a partition in my redshift table may not be available until days later, after other partitions have become available. How can I have my sensor continue to look for an older partitions after new ones become available? I could select all partitions, but how can I determine which of those have been already materialized?
For example, the sensor will check for the 6/8 partition until get_last_partition_key becomes 6/9. If both 6/8 and 6/9 are still unavailable, how can I have this sensor continue to monitor for both 6/8 and 6/9? And furthermore, how can I have the sensor continue to look for 6/8 after 6/9 has materialized?
Beta Was this translation helpful? Give feedback.
All reactions