Can a dbt job be triggered or run based on the results of a table

Can a dbt job be triggered or run based on the results of a table. I have a table that will get populated by an outside process in Redshift and I would like to query this table in order to determine if the dbt job should run. If the conditions are not met then I would like the process to sleep and keep checking this table until the conditions are met.

1 Like

Hi Juan,

While I haven’t tried it by myself - it’s going to happen in the near future - I was pointed to Airflow SQL sensors: airflow.sensors.sql — Airflow Documentation

Take a look at docs if you can figure out how to do it. I can add some content once I actually manage to do it; also - would be very interested if you post any news about your success. :slight_smile:

Cheers,
Tomaz