You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/05 07:36:22 UTC

[GitHub] [airflow] muscovitebob commented on issue #10160: Airflow cannot read files in Packaged DAGs folder.

muscovitebob commented on issue #10160:
URL: https://github.com/apache/airflow/issues/10160#issuecomment-669033914


   I encounter this a lot when using packaged dags also, the workaround I use is to utilise [this function](https://github.com/apache/airflow/blob/4e3799fec4c23d0f43603a0489c5a6158aeba035/airflow/utils/file.py#L78) to first load the file contents into a string before passing them to the relevant operator (it seems most operators that support reading a file also support taking a string instead). The function is quite portable so one can pluck it from the source code if the version you are running does not yet contain it. Would indeed be nice to be able to access extra files in packaged dags without code modifications, however.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org