From the course: Apache Airflow Essential Training
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Creating and running a pipeline with SQLSensors - Apache Airflow Tutorial
From the course: Apache Airflow Essential Training
Creating and running a pipeline with SQLSensors
- [Instructor] In this demo, we'll work with a different kind of sensor, the SQL sensor. The SQL sensor will work for the SQL condition that you have specified using a SQL statement to be true. Once that's true, the SQL sensor will allow your DAG execution to continue. Note that I've logged into PSQL and I'm connected to the laptop database. This is the database that we had created in an earlier demo. Now let's run a backslash DT command to check what tables are present under this database. And you see that the laptops table is available here. Now we are going to be reusing the laptops table for this demo, so I'm going to go ahead and drop this table. So drop table laptops. In this demo, we'll recreate this table and wait for a certain kind of data to be present in this table before we proceed with our workflow execution. Here I am in my pipeline with SQL sensor file. You can see the import online four for the SQL sensor. I'm…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.