Hi everyone! What is the best way to add additiona...
# best-practices
a
Hi everyone! What is the best way to add additional packages to Airflow (managed by meltano) installation? Ideally that would be
requirements.txt
file in
transform/
directory.
a
No transform is unrelated to airflow. Add it to the pip_url !
Copy code
plugins:
  orchestrators: 
  - name: airflow
    pip_url: airflow[aws] aws-cli smart_open
This is kind of pseudo code cuz I just typed it on my phone but that's generally how you would do it. pip_url what you would put after pip install.
a
Yeah, I meant to write
orhestrate
And
pip_url
is fine but kinda unscalable. Can't see it grow over 5-10 deps. Hm, I could write
-r orchestrate/requirements.txt
in
pip_url
Hacky, but might work
a
Lmk if that works. Kind of curious.
a
Yes, it works
a
Fascinating approach of using
-r .../requirements.txt
along with other direct references in
pip_url
. Very cool - glad to hear this worked! 🔥
a
Agreed @aaronsteers 🙂
a
We had another use case come up recently where a pluralized "additional Pip installs" was found to be helpful, and if accepting a list of additional components, if could very likely also make sense to accept something like a requirements.txt as a list item in yaml, with or without the -r flag, since we could likely detect from a simple regex that it is a requirements file and not a library name.
We don't have anything logged for this yet as far as I know, but I think the pattern has some significant benefits in terms of readability and maintainability.