Closed adamantike closed 1 year ago
note-to-self: Keep this trick in mind for future development.
@tomasfarias, thanks for the quick review and resolution! Glad to see this project well supported and moving forward.
Moreover, it's a common pattern in other Airflow provider packages
Exactly, I looked at some official providers to follow the same pattern, as I thought that could be a concern if a separate module didn't exist until now.
After a previous commit [1] improving import time on operator import, this commit fixes the import time issues when instantiating any of the dbt operators.
The main issue still present was the enum imports in the operator constructors, which make DAGs slow to import any time they instantiated one of them.
Profiling can be easily run locally, with the following command:
[1] https://github.com/tomasfarias/airflow-dbt-python/commit/67c8d7866235e105675bd208659aac2ccc26070e