Skip to content
Advertisement

How to execute multiple sql files in airflow using PostgresOperator?

I have multiple sql files in my sql folder. I am not sure how to execute all the sql files within a DAG?

JavaScript

For a single file, below code works

JavaScript

Advertisement

Answer

With a list

JavaScript

Or you can make it dynamic

JavaScript
Advertisement