Forum Discussion

Kobe_Lenjou's avatar
Kobe_Lenjou
New Member
2 years ago

Data Workflow - Ignoring requirements.txt

Hi,

 

I have followed the guide on dbt and Data Workflow (https://learn.microsoft.com/en-us/fabric/data-factory/data-workflows-dbt-fabric). While the tutorial offered is slightly inaccurate, you need to add

 

from airflow import DAG

 

before the UI recognises  the file as a DAG. Okay, minor issue, it's in preview.

So I adapted my own existing (and working fine) dbt solution into a dags project following the structure on (https://learn.microsoft.com/en-us/fabric/data-factory/data-workflows-sync-git-repo) this page.

After conifguring Data Workflow to sync with my Github repo it throws me the error

 

ModuleNotFoundError: No module named 'cosmos'

 

I did add this to the dags/requirements.txt file

 

astronomer-cosmos==1.5.0
dbt-fabric==1.8.7

 

The error is really fast. I have the idea it's not even trying to read my requirements.txt file there.

This is my folder structure in the repo 

 


What am I missing?
Thanks in advance

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kobe_Lenjou 

     

    The following suggestions are for your reference:

     

    • Make sure your requirements.txt file is in the correct directory, it should be located in the root of the dags folder.
    • Ensure that there are no spelling errors or formatting problems in the requirements.txt file.

     

    Best Regards,
    Yulia Xu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.