piperider icon indicating copy to clipboard operation
piperider copied to clipboard

no dbt project found

Open fabio-gz opened this issue 2 years ago • 7 comments

Describe the bug I updated to piperider 0.26.0 and when I try the command 'piperider run' it says that no dbt project was found. I used piperider on this project in the early versions and had no problem

To Reproduce Steps to reproduce the behavior:

  1. piperider run (in the dbt project folder)
  2. output: Error: No dbt project was found

fabio-gz avatar Jun 02 '23 01:06 fabio-gz

Hi @fabio-gz,

Can you please verify that:

  • You are in the root of your dbt project
  • There is a dbt_project.yml present in the directory

Thanks,

Dave

DaveFlynn avatar Jun 02 '23 01:06 DaveFlynn

Hi Dave, Yes I am at the root of the dbt project and the dbt_project.yml is in that directory Thank you

fabio-gz avatar Jun 02 '23 02:06 fabio-gz

I wonder if there is something in your PipeRider config.yml is causing the issue.

Could you please try temporarily backing up your .piperider folder and then running piperider again?

There's no need to init anymore, so you can just use the following commands:

mv .piperider .piperider-bak
piperider run

Thanks,

Dave

DaveFlynn avatar Jun 02 '23 08:06 DaveFlynn

It creates the .piperider folder but only with a .unsend_events.json file, I tried to manually create the config.yml file and when I use the command 'piperider run' (I added the piperider tag to some models) it looks like is trying to profile sources and it fails but when I use 'piperider run --table

' it runs ok. This project is on dbt version 1.2.2, I have a personal project on version 1.4.1 that runs without problems, could this be the issue? Thank you

fabio-gz avatar Jun 02 '23 14:06 fabio-gz

Hi @fabio-gz ,

Initial testing indicates that the dbt-core version is not the issue. We're currently still trying to recreate the issue, I'll let you know when we have some more information.

Thanks,

Dave

DaveFlynn avatar Jun 07 '23 02:06 DaveFlynn

Hi @fabio-gz

Sorry for late reply. We still cannot reproduce this issue.

Could you try to simplify to the following steps.

  1. Prepare the testing environemt:

    mkdir /tmp/piperider
    cd /tmp/piperider
    python -m venv ./venv
    source ./venv/bin/activate  
    pip install piperider==0.26.0     
    
  2. Run piperider in the empty project:

    $ piperider run
    Hint:
       Please follow the Quick Start guide on https://docs.piperider.io/get-started/quick-start to set up your first PipeRider 
     project.
    Error: No DBT project found in current path
    
  3. Run piperider with dbt_project.yml

    $ touch dbt_project.yml   
    $ piperider run
    Hint:
      Please use 'dbt debug' to verify the dbt configuration.
    Error: Failed to load dbt project '/private/tmp/piperider/dbt_project.yml'.
    Reason: 'NoneType' object has no attribute 'items
    

If your case, the error Error: No DBT project found in current path is raised because PipeRider cannot find the dbt_project.yml file. There could be some reason that make your project search in another dbt project path.

The precedence to find the dbt project is

  1. project dir from command line option: piperider run --dbt-project-dir
  2. project dir from config .piperider/config.yml: The config path is .dataSources[].dbt.projectDir
  3. the current directory

popcornylu avatar Jun 13 '23 02:06 popcornylu

Hi @fabio-gz

I'm interested to know if this issue was resolved for you?

Please let me know if you need further help.

There have been many updates to PipeRider in recent weeks, I would advise updating the latest version before you try again with:

pip install -U piperider

Thanks, Dave

DaveFlynn avatar Aug 11 '23 08:08 DaveFlynn